fix #1555 -- fix `nikola auto` with galleries (and listings)

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Merge branch 'master' into indices_pages_improvement