get the outpoint index correctly, reintroduce check for doublespending