revert the removal of the GlobalEngine bookkeeping. This belongs in another patch

This reverts one hunk of commit 00e748c5498865d210074d6fd618fca49941d355.