Restore variable behavior on module reload

This contains pull request #138.