[SOLVED] Confused about gid in XML file

I have a c++ utility that reads Tiled XML files. This normally works great. But I am getting a weird bug I don’t understand. I have an object saved in the XML file with a gid of 2589. But it belongs to a tilemap that starts with gid 522 and only has about 200 tiles. The tile in question should be around gid 600. The XML only has 3 tilemaps in it. None of them have gid values anywhere near 2500. Where is it getting that large number from?

EDIT: nevermind – I figured it out! My own error.