Deal with hot-code-reload much better.

Fixes #2