[MAT-388] Delete local refs of OGExpr nodes

After tree construction OGExpr local refs are no longer required,
so we can delete them. We cannot delete local refs for terminals,
because they're required at the end of execution for unbinding
arrays.