Local modification checks algo improved (fixes #6)