JAL-2805 added check for sequences already being present in tree nodes