We need to the value of `max_num_cores` obtained via `cpuinfo` also in the cpuset case, that's why obtaining it is done first. Note: there's no `return` here anymore, that part is right before the 'outer' `else`.