bugfix for a corner case in matchSequencesSweep