tree: update line number when inserting tree entries