BUG: CLI flags do not take precedence over env var DBT_DEFER_STATE

When specifying the env var dbt_DEFER_STATE in your terminal, it appears to be considered even when you try to overrule the state manually using dbt test --defer --state mystate

The following example results in stateprod being used as state.
image

When doing the same with dbt_STATE (and unsetting dbt_DEFER_STATE), it works as expected, and the flag gets precedence.
image

I actually figured I should probably place a bug report. So did that here: