Neutron depolarization by amorphous magnets in the critical region