An implementation of Michael's fix in #900 (commit bfdb988) for
the new split branch.