Fix #1148: compiler crash with scoverage

This PR fixes #1148 with a generalization of the way we handle label-defs for tail-recursive calls.