Slight refactoring: pattern compilation error now wrapped in a MessagingException.