If you're using -printtoconsole, a patch was made recently to bitcoin that fixes this problem:
https://github.com/bitcoin/bitcoin/commit/283e405c063acfca304acbff505badcbbcb814c9
edit(testnet):
sometimes when my P2Pool node sends submitblocks to the daemon i get the error:
ERROR: AcceptBlock() ...