It may be because of this sentence in the documentation:
Your code must not depend on the order in which fields are returned, because that order varies.
You're skipping the first item you iterate (your header
variable). That will only work if the fields come back in the same order every time.
Try removing the code that skips the "header", and instead getting the field value into a variable and checking whether value.Equals(default(T))
. That would skip the enum value with 0 as its backing integer value.