Fix regressions after refactorings in substance-tests.