Btw, those ints needs to be ints.
The prob was that the array size was determined by the last element in an enum with 7 or 8 values. And I inadvertently assigned 8192 to the second last element in the enum to test something and completely forgot about it.