There were 3 bugs with both data types - using freed memory while sorting. - sorting failed in some situations. - scaling allowed multiple items to be on the same frame. Replace this with a simple sort + de-duplicate, taking selection into account.