The two expressions was giving different numerical results (diff~2e-14), in rare…
The two expressions was giving different numerical results (diff~2e-14), in rare cases leading to a different number of points in the two loops, giving an undefined value in sphere%map.