We study numerically the behavior of some topological spiral defects, their dynamics being governed by a complex Ginzburg-Landau equation with space-dependent coefficients. We show that the interaction between a spiral and the gradients of the coefficients can counterbalance the repulsion between defects of identical sign and lead to topologically stable patterns. Configurations of several defects with the same topological charge have been observed recently in nonlinear optics experiments.