I dunno how that works either. I'm guessing he sort of left it in his corpse as a sign for Cloud and company to see (since he was the one who opened Cloud's cell, so he obviously wanted him to see it), and then he came back and got it afterward, I guess.
--
http://images.cheezburger.com/completestore/2011/8/22/2094c2de-bae8-4f5b-9f27-67eaff0aaeaf.jpg