Fix migration clash detection