Make getLabels return an eager iterator to avoid comodification exception