Turns out lookup_flag returns the flag, not true/false.