Motivated by recent studies reporting the formation of localized magnetic moments in doped graphene, we investigate the energetic cost for spin polarizing isolated impurities embedded in this material. When a well-known criterion for the formation of local magnetic moments in metals is applied to graphene we are able to predict the existence of magnetic moments in cases that are in clear contrast to previously reported density-functional theory (DFT) results. When generalized to periodically repeated impurities, a geometry so commonly used in most DFT calculations, this criterion shows that the energy balance involved in such calculations contains unavoidable contributions from the long-ranged pairwise magnetic interactions between all impurities. This proves the fundamental inadequacy of the DFT assumption of independent unit cells in the case of magnetically doped low-dimensional graphene-based materials. We show that this can be circumvented if more than one impurity per unit cell is considered, in which case the DFT results agree perfectly well with the criterion-based predictions for the onset of localized magnetic moments in graphene. Furthermore, the existence of such a criterion determining whether or not a magnetic moment is likely to arise within graphene will be instrumental for predicting the ideal materials for future carbon-based spintronic applications.