It seems to be related to it sorting based on the picture file names. I made a test version where the file is in a separate column from the unit name. When the "Unit" column is sorted (names only), it works fine, but the same oddities happen as before when it is sorted by the picture. Not sure what the cause is or how to fix, but hopefully someone else can figure it out from that.

Community content is available under CC-BY-SA unless otherwise noted.