Fixed broken first and last implementation on TEUnion.