workflows: snapshot generation fix

* Fixes the generation of snapshots to take into consideration
  the new ObjectVersion's ERROR and WAITING.

* Adds a new test to cover this issue.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
I do not think that will work because I believe `foo in dict` is equivalent to `foo in dict.keys()` and I need `dict.values()`.