Fixes a bug where lazy loading triggered KeyErrors