Is there not a blanket/implicit release of claim that goes along with posting code on SO?
When I copy code verbatim from SO or another "help" site, I generally put a comment right above that chunk of code, something like:
/* See: http://stackoverflow.com/a/xxxxxxxxxxx */
Don't know if that's enough to protect against any ownership claims though.