SWORD cleanup (especially globalId handling) #3385