Add methods to manipulate the Flags field (TODO: need to unexport Flags)