$post_pre = $post is a reference in PHP5. Need to clone.
$post_pre = $post
$post_pre = clone $post?
I suspect that's the fix. Just haven't had a chance to test. If it works, more than glad to accept a pull request :)
Just send a pull request for that :) Tested it on my install and it works.