See:
bitcoin/bitcoin#7532
result field blockindex is NOT "The block height of the block on the local best block chain which includes this transaction" it IS "the position of the transaction in the block"
Applies to gettransaction and listtransactions, there may be others