Sync move-if-change from Gnulib