rust-lang/rust#10374
Because of that bug, we can't really use enumflags when we need to serialize to an architecture dependent size. For example: std::os::raw::c_ulong. We can either try to get it fixed in the compiler or we can try to work around it.