Fix Trac #3403: interaction of CPR and pattern-match failure