Repulsive fluxons in a stack of Josephson junctions perturbed by a cavity