Fix 'Views object should accept functions that return a View', #366