Give an error if view pattern syntax is used in an expression; fixes #2033