Merge master from upstream to get past the problems related to the submodule for resid once and for all. See #6916.