Fix bug that causes previous last changed version to be written again

It causes infinite builds :(