The logging in BinaryenModuleDispose indicates that imports and exports should be cleared, but the code doesn't actually clear those variables.
It's not clear that the .clear()'ing of things is really useful in the first place, since the Module is being deleted.