Remove unused configuration
Check if the context has view paths in invoking Function

The context may by neither view nor controller, but a normal context.