Remove to_flags monkeypatch
Use original value when building the flag