I created a gallery with 12 images. I uploaded the gallery to a post. The images show in rows of 4 across. The first 2 rows (8 images) show correctly, but the last row shows incorrectly. The 1-3 columns on the 3rd row show nothing. There is a gap (space) where the 9-11 images should show. The 9th image shows alone at the end of the 3rd row (where 12 should show). The 10-12 images show on a 4th row in the 1-3 columns.
I have checked and rechecked the code. Everything looks correct.