Changed DiscoverPacket to also use the getflags in the setflags methods