Fix inactive when scripts do not load

*Needs review.* This pull request attempts to fix the `inactive` callback not being called when a module script fails to load. This has been reported in issue #142.