Fix conditional module rendering
Merge pull request #4036 from edx/flowerhack/conditional-module-rendering

Flowerhack/conditional module rendering