Move resetting of paste state variables to after afterPaste

So that if the function bails with a return they are still run.

Bug: 58346
Change-Id: Ibd0f194e9c31e2b023dbd00a13ade51785f78ae6
(cherry picked from commit 60262b883e5d8d3d017007bbdae4ccde441d5b49)