According to the Bitcoin wiki:
"When a block becomes an orphan block, all of its valid transactions are re-added to the pool of queued transactions and will be included in another block. The 50 BTC reward for the orphan block will be lost, which is why a network-enforced 100-block maturation time for generations exists."
Ok, so let's say at block height X, two miners produce separate valid blocks - block A and block B. The miners compete with each other to mine on top of these two blocks. Eventually, the chain with block A becomes the longest chain, and thus block B becomes orphaned. However, the chain with block B is more than 100 blocks long (despite it being the shorter chain). Does this mean that, despite block B being orphaned, the miner who mined block B can still spend the block reward?
In addition, consider another scenario: a miner goes back to a previously orphaned block (a block that was orphaned in, say, 2 months ago) and starts mining on top of it. He produces a chain that is 150 blocks long. Although this chain is still shorter than the main chain, according to the 100-block maturation rule, the miner can spend the block rewards of the first 50 blocks of this 150-block orphan chain, right?
I know the scenarios I suggested above are very unlikely to happen in reality, but I'm just curious.......