Fixing some edge cases with similar notes

Fixing edge cases where notes that only partially ended with the current note were rejected

Author: lhunker