Protect singleton and lazy bindings against concurrent access, and test that this works.