Docbuild fixes #3475

Fixes bug in new repo docbuilding.