Improve handling of negative densities in mhd/common.hpp.