SFM: fix out of range index in remove_inconsistent_matches