Fix for incorrectly flattening secondaries.