added Let to ContractTransform

...however, something more fundamental is broken in there, it somehow
got two types "contr" in scope. Switching Contract to ContractSafe
did not work (leads to a lot of type errors)