Fixes some of the bugs in 2.6.4.1, made in the branch StructureMapFix