Fix Trac #2674: in TH reject empty case expressions and function definitions