P2Pool doesn't validate the block reward because of the significant resource usage of querying the UTXO set so it relies on miner honesty.
Thank you for pointing that out. While the attack you implemented could be defended against by checking all transactions to see if they're in bitcoind's mempool, and if they're not, passing the transaction to bitcoind for validation (thereby incurring the tx validation cost in the critical path only for rare cases when the transaction is heard through a share before bitcoind has received it), and then checking that the coinbase reward is no more than the sum of the transaction fees and the block subsidy, but you're right that this proposed change increases the attack surface area too much for now.
At some time in the future, transaction fees will exceed the block subsidy, and we will likely need to have p2pool shares be weighted by fees at that time to keep the incentives aligned properly. However, it seems to make only a 1% difference in the reward assigned per user right now, this change is probably premature at the moment.