That was a last-minute collection of hacks which should be deleted. Need to define new APIs in `scm-api` to do these things properly.