Serialization bug in Windows Workflow Foundation

A few days ago Martijn and I had a really weird problem with our SQL persistence store for Windows Workflow Foundation. Martijn was trying to build a small application that had to start all workflows with a timer, so that the timers that were expired were handled by the workflow. Somehow he got an exception telling him there was a cross-reference between two IObjectReference instances. After trying again a few times on his computer I decided it was a good idea to copy the code over to my workstation and try some things out.

When I compiled to code on my computer