Factor out stash loading.