The opening and closing of a hollow dislocation core: A Monte Carlo simulation