Detect unary operators in when statements. Fixes #182