Fix setting flags on servers with no PERMANENTFLAGS response (#1490087)