Handle errors during rereading properly
Handle errors during rereading properly

Without this fix, any error during rereading would cause Hugo to hang.
Fixes #2168
Closes #2179

MarkDBlackwell/hugo,anthonyfok/hugo,anthonyfok/hugo,MarkDBlackwell/hugo,mitchchn/hugo,melo/hugo,digitalcraftsman/hugo,gohugoio/hugo,tischda/hugo,mayah/hugo,fedelibre/hugo,abourget/hugo,fedelibre/hugo,fedelibre/hugo,mdhender/hugo,tischda/hugo,mdhender/hugo,mitchchn/hugo,tubo028/hugo,fedelibre/hugo,bogem/hugo,mdhender/hugo,vbatoufflet/hugo,ffrizzo/hugo,gohugoio/hugo,bogem/hugo,Zenithar/hugo,Zenithar/hugo,jygastaud/hugo,mdhender/hugo,digitalcraftsman/hugo,melo/hugo,vbatoufflet/hugo,tubo028/hugo,ffrizzo/hugo,jygastaud/hugo,abourget/hugo,gohugoio/hugo,mayah/hugo,anthonyfok/hugo