### ImageMagick version

7.1.1-12

### Operating system

Linux

### Operating system, version and so on

Linux nixos 5.15.110 #1-NixOS SMP Sun Apr 30 23:23:24 UTC 2023 x86_64 GNU/Linux

### Description

`7.1.1-12` identifies 2 images in one JPEG:
```shell
$ identify --version                                                                                                                                                                                                                        
Version: ImageMagick 7.1.1-12 Q16-HDRI x86_64 b3f8ed7a7:20230625 https://imagemagick.org                                                                                                                                                       
Copyright: (C) 1999 ImageMagick Studio LLC                                                                                                                                                                                                     
License: https://imagemagick.org/script/license.php                                                                                                                                                                                            
Features: Cipher DPC HDRI OpenMP(4.5)                                                                                                                                                                                                          
Delegates (built-in): bzlib cairo djvu fontconfig freetype heic jng jp2 jpeg jxl lcms lqr lzma openexr                                                                                                                                         
pangocairo png raw rsvg tiff webp x xml zlib                                                                                                                                                                                                   
Compiler: gcc (12.3)                                                                                                                                                                                                                           
$ identify sample.jpeg                                                                                                                                                                                                                         
sample.jpeg[0] JPEG 1197x1280 1197x1280+0+0 8-bit sRGB 602412B 0.010u 0:00.000                                                                                                                                                                    
sample.jpeg[1] JPEG 1197x1280 1197x1280+0+0 8-bit sRGB 536657B 0.000u 0:00.000
```

I ran the same command with both `7.1.1-8` and `7.1.1-15`, and both reported just 1 image:
```
sample.jpeg JPEG 1197x1280 1197x1280+0+0 8-bit sRGB 602412B 0.000u 0:00.000
```


### Steps to Reproduce

1. Install imagemagick `7.1.1-12`
2. Download the attached file `sample.jpeg`
3. Run `identify sample.jpeg`

### Images

![sample](https://github.com/ImageMagick/ImageMagick/assets/29929587/0a97c5ba-0e42-4cd0-9c17-7f8e72a364cb)

2 images identified in one file
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : 2 images identified in one file
Issue date:

--- start body ---
### ImageMagick version

7.1.1-12

### Operating system

Linux

### Operating system, version and so on

Linux nixos 5.15.110 #1-NixOS SMP Sun Apr 30 23:23:24 UTC 2023 x86_64 GNU/Linux

### Description

`7.1.1-12` identifies 2 images in one JPEG:
```shell
$ identify --version                                                                                                                                                                                                                        
Version: ImageMagick 7.1.1-12 Q16-HDRI x86_64 b3f8ed7a7:20230625 https://imagemagick.org                                                                                                                                                       
Copyright: (C) 1999 ImageMagick Studio LLC                                                                                                                                                                                                     
License: https://imagemagick.org/script/license.php                                                                                                                                                                                            
Features: Cipher DPC HDRI OpenMP(4.5)                                                                                                                                                                                                          
Delegates (built-in): bzlib cairo djvu fontconfig freetype heic jng jp2 jpeg jxl lcms lqr lzma openexr                                                                                                                                         
pangocairo png raw rsvg tiff webp x xml zlib                                                                                                                                                                                                   
Compiler: gcc (12.3)                                                                                                                                                                                                                           
$ identify sample.jpeg                                                                                                                                                                                                                         
sample.jpeg[0] JPEG 1197x1280 1197x1280+0+0 8-bit sRGB 602412B 0.010u 0:00.000                                                                                                                                                                    
sample.jpeg[1] JPEG 1197x1280 1197x1280+0+0 8-bit sRGB 536657B 0.000u 0:00.000
```

I ran the same command with both `7.1.1-8` and `7.1.1-15`, and both reported just 1 image:
```
sample.jpeg JPEG 1197x1280 1197x1280+0+0 8-bit sRGB 602412B 0.000u 0:00.000
```


### Steps to Reproduce

1. Install imagemagick `7.1.1-12`
2. Download the attached file `sample.jpeg`
3. Run `identify sample.jpeg`

### Images

![sample](https://github.com/ImageMagick/ImageMagick/assets/29929587/0a97c5ba-0e42-4cd0-9c17-7f8e72a364cb)

--- end body ---
