split out exception handling logic for moved keys

want to be able to share this logic in the pipeline context later when packing keys and issuing commands in parallel.