add a copy function that can copy any lval tree