Don't export "private" instances

This fixes #502. I'm not crazy about the method used here, but it seemed the most suitable place to do it in the end.

By "private" I mean the instance is for a class or type that is defined in the same module as the instance, but is not exported, so therefore the instance can't be used outside of the module anyway.