Fermi-liquid instability at magnetic-nonmagnetic quantum phase transitions