OpenMRS crashes irrecoverably if particular errors occur during module loading  - TRUNK-2850
(cherry picked from commit 860a84e99e844792afc856b586dffb3f203b10a7)