Modelling the capillary locking of point defects in nematic liquid crystals