Fixed intermittently failing test (entity order is random).