Dynamics of vortex formation in merging Bose-Einstein condensate fragments