Matrix Images point to old images with same names

Windows 11
SDK v2.1.1

I had an image called gun_shooting.gif of 6 frames which I was using for animation.
I imported another image called gun_shooting-table-64-64. A matrix image with 15 images laid out in 3x5.

I spent half hour scratching my head, why imagetable:getLength() still returned 6 instead of 15. Then I deleted the old gif. And the returned value was 15. Possibly a bug?
Just for clarity, I made sure to use proper file names.

If you had both images in the folder at the same time, they're effectively the same filename as far as the SDK is concerned.

I'm not sure it's documented which one will be loaded, but most likely the one that was there first. Undefined behaviour?

Yeah, undefined afaik.