Give StructureRegistry a way of returning typed or parent typed
structures, fix issue #264.