Fixes modules being installed after an error

This stops modules being tagged as installed after false was returned from the modules install function.