Rewrite of "safe-let-subst" to not use "occurs-analysis".
Resolved merge.