Allow multiple serialize/unserialize runs

This PR changes `SerializableClosure` to allow multiple serialize/unserialize runs without losing the state. The same behavior was possible with the previous, function parser based version so it merely fixes a regression.