Refactor insert/materialize node schemas.

I gotta believe this one has been invented before, but maybe not. In any case, RegressionSuite SHOULD know this trick.