Can you replace this by tx.IsPruned(), and see if things still work?