Add an explicit diagnostic for the case where an expression is not a constant
expression because it uses 'this'. Inspired by PR20219 comment#2.