Fix breaking doc build

Attempt to fix #1707.

@takluyver Does this fix the issue for you?