test that `sort` doesn't mutate internal agentset order

(passes here, fails in Tortoise)