Shot the tertiary capture problem in the butt

Figured out a way to identify scenarios where kings would cause an out
of memory exception when looking for captures if they returned to the
same spot they were previously.