Add reset pending statement which I found I needed when writing up the
explanation of this patch.