Squashed commit of the following:

add function to prevent swap/collapse with matches
comment explaining 2D swap topo check