[MRG] Docbuild fixes for #3475

Fixes bug in new repo docbuilding.

Addresses #3475