The preferred way, when possible, is to handle variables in `OpamState.env_filter`.
the `local_variables` parameter was added to handle variables which are specific to a field and can't be known globally (specifically, the `success`/`failure` variables in `post_messages`), while most of these make sense for all fields. Not sure how easy they would be to compute there though.