This PR adjusts the experimental module system to not export any private declarations from modules. Fixes #5002