So panels will process the contexts attached to a panel in one pass. I have a custom context that needs to be evaluated after the normal panes, but before any 'render last' panes. My use-case is putting searchapi/facetapi features into content-types. The actual search results pane must be processed first and the other blocks are processed afterwards via 'render last'. The context I've created provides a default 'current active searcher' context which can only be determined after the search results is run.

The least involved solution I could think of was to call an additional ctools_context::evaluate at the end of ctools_context_required::select to reprocess and then final check if context is valid. This would require me to always return a context in the create_[context] function and instead handle the null context behavior in evaluate.

Is there a better way to handle this?