Switched back to checking ending ID incrementally.
Otherwise, when correcting it it stays marked until a save.
Fixes Issue #243

we now maintain the internal lists the same way as specified in tha
standard.
findInstanceObject just has to traverse thing in reverse.