Be more forgiving about attribute ordering
We don't really have firm control over the way attributes are ordered in the list, so the assumtion that we see proper nesting for baseline shifts was a bit optimistic.
Just look through all open stack items for a match, and remove that.
Test included.