Fix DEBUG mode segfault in GlobalChi2Fitter
This commit fixes a sloppy segmentation fault I introduced in !35126 (merged). The segmentation fault occurs only in debug mode, as it concerns the deferencing of a smart pointer after release. We simply re-order the lines to fix the issue. Affects ATR-21725.