Added build error message for modules missing parent_select.module_id

Addresses: http://manage.dimagi.com/default.asp?133172#752523

A user managed to get a module into a state where `module.parent_select.active` was `True` but `module.parent_select.module_id` was `None`. This adds build validation that checks for that condition.
Good catch. New PR here: #4341.