The kingdom building Great Mill has an odd construction cycle. Instead of costing materials when it's produced, it consumes a set of materials once it has been built (only once). Since it is the only real cost of the building (costs no gildar), I assume it's a bug.
The problem is in the XML
<GameModifier InternalName="Production1">
<ModType>Resource</ModType>
<Attribute>Materials</Attribute>
<Value>-12.0</Value>
</GameModifier>
should be
<GameModifier>
<ModType>ConstructionResourceCost</ModType>
<Attribute>Materials</Attribute>
<Value>-12</Value>
</GameModifier>