Fixed a potential bug in the tag stack with tags sharing the same position being added after the initial sort. Also, the tags are not systematically sorted anymore if they're already in the right order
Synced to 6e9e6c01f023aa6b70c51b709d6908507533b0ed
Synced to 6e9e6c01f023aa6b70c51b709d6908507533b0ed