Don't build some doc objects unless in DEBUG mode.