A solution to this was added in Declarative 1.2.6 - the beforeAgent true option to put inside when. If given, the when will be evaluated before entering the agent for the stage.
Bulk closing resolved issues.