Fix unmatched returns dialyzer warnings

Fixes unmatched returns dialyzer warnings from #2478.

Generated erlang issues:
* There are still warnings for `for` comprehensions when matched against an empty variable.
* Unmatched returns for `cond` expressions report the wrong line (the line of the first clause).
Same here. It could be already started (and it will likely happen when generating cover recursively in umbrella projects).