Cleanup refcount handling in module init code.