graphalign truncation fix + new tests

Not ready for review or merge
reason 2 for improved performance: this term was missing