Proper backtracking in simplematch; fixes bug #632888