Fix potential scheduling while atomic in mesh_path_add.