[union] fix infinite loop with tri-tri union