On the coexistence of magnetism and intermediate valence