Fix last commit detection, to avoid continuous rebuilds