While I was working with @ridmal on extending Initializer to handle programs, workflows and states I came across something weird.
In one of our tests we ended up adding the same workflow to two different programs (see here). This makes sense in the real world by the way, but our data model doesn’t quite support that situation adequately.
More specifically the issue is that
ProgramWorkflow.getProgram() returns a single value (here). And it happens to be the last program to which the workflow was added.