Remove duplicated code in 'reload'.

This code was factored out a long time ago, but got duplicated by
accident in a merge conflict resolution (611298f).

Also lay some groundwork for a unit test.
Add 'reload' unit test