Fixed a huge unnoticed bug, which is that the indices are static, so once the order changes in an entity's set (like in s.sort) they are flat out wrong.