Fix global namespace leak detection.

Closes #151.