Fixed error in GatherSwapStats (kludge-enum-function was being accessed as if it were a local scalar.)