Fixed https://issues.openmrs.org/browse/TRUNK-4327.