Fix to copyright licence check logic

This PR modifies the logic within the licence checking introduced by #477. It fixes an issue where the date of last change could be overwritten by an earlier modification.