Fixed some places where KeyErrors would occur if the "production-type" attribute was omitted from an XML element.