Workaround for headless mode.
Refactoring to use a factory for creating FilterControls