Tracked down an evil bug in Group.swap that caused the linked list to get corrupted in an upward (B to A) neighbour swap.
Fixing up Group.sort
Added Group.sort, can sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :)