Fixes #4020 - Move static handling to a filter