The most egrarious thing this fixes is the report about the total number of loaded modules after starting a session. Ticket #20889 (cherry picked from commit 2b0e0862)