Fixed backtrace bug

Missed keepGapping check for determining whether to match A-C or gap the A (for both left and up directions).