Fixes #8793
Add missing delete and additional checks in intermodule singleton code