Fix motif occurrence at the beginning of the first sequence

This fix is akin to the last one; just addressing motif occurrences at
the beginning of the first sequence rather than those at the end of the
last sequence.
As suspected in the preceding commit, such problems also existed and are
now hopefully fixed