Deglob stdlib

This is another attempt to address GH #12006. I've rebased against master and only two commits appear. Let's hope the Windows build works now.