Fix serialization of origins parameter

Adds a failing test for @maebert's sage copypasta fix, builds on his commit to fix serialization of different iterables for `origins`.