The setlastblock call sets the current "best tip" of the blockchain in this node, but it does not remove blocks from the "tree" which contains all of the forks. So after this node mines block 11 (which will be different from the original block 11), it still finds the longer original branch in the tree, and switches back to that branch. If you consider that a node will usually be only one of many in the network, and one of many miners, removing the branch locally will not be effective anyway, because other nodes will still have a copy of it.
If you really want to revoke a transaction, after each block is mined on the new branch, you will have to recursively pause mining, then setlastblock to that new block, then resume mining. Once the new branch is longer than the previous one, it will represent the new network consensus. But the transaction you wish to revoke will still be in the mempool of other nodes, so it would have to be cleared from those as well.
In summary, I would say that blockchains are not designed to allow transactions to be revoked :)