Harry and friends had to go out and destroy every single horcrux completely, so the basilisk injuring him didn't get rid of the horcrux. When Harry gets killed (but it's Harry so he survived) THATS when the horcrux is destroyed.
Basically, the Basilisk didn't kill Harry but when he dies the horcrux is destroyed. Harry comes back but the horcrux doesn't.