tree-optimization/113080 - missing final value replacement