MessageParser: Fix crash if not all matches are used in the replacement.