Trim off last newline in getConcatenation, and clear the depGraph on invalidation