Fixed a bug with flagFuncs to stop assigning the unitTableDef if the corresponding units entry was invalid.