Anelastic spectroscopy as a selective probe to reveal and characterize spurious phases in solid compounds