Can't use more function modifiers than necessary

Fixes #2139