Well what im trying to say is that, when kakashi died against yahiko he saw his dad, obito and rin. How can he have seen obito in afterlife when he is on earth??xd
It didnt really happened. Do you remember Zabuza speaking to Kakahsi about him remembering dying next to Haku and 1 second later he was revived by edo tensei, well that already implied that nothing awaits you in the afterlife so the talk probably was only in Kakashi mind as was seeing old team Minato.
His imagination.