SI-8657 don't miss tailrec defs in more positions

1) First operand of boolean expression using `&&` or `||`. Second operands of
   those boolean exprs were already treated specially here but handling for first
   operands was missing.
2) Condition of `If`. Also added a test for guards.
Merge pull request #3832 from jrudolph/w/fix-tailrec

SI-8657 don't miss tailrec defs in more positions