Maxwell equation violation by density dependent magnetic fields in neutron stars