> Or is it done this way because this only applies to the "extra" flags, which are always strings?

Right, exactly. Those are the only ones we need to filter, the ones coming from the user. For the structured ones we generate we can override them easily (e.g. we already set optimisation to -O0).