Unable to normalise argument error

Okay, this is weird. This code throws an error:

kwargs = {amp: 2, foo: [1, 2, 3]}

sample :bd_808, **kwargs

This seems trivial, but I need to find a fix, because I have wrapper methods where I can pass in arbitrary params to control a sample or synth, and I need to pass them through to the synth or sample.
But if the value of the hash is an array, it totally chokes.
I’ve hacked the code I’m working on to strip out all args that contain array values in the hash, but I’d like a more elegant solution – and an explanation of why this is happening!
Any insights?
Thanks!

It looks like it’s coming from here in the Sonic Pi source code.
I don’t think arrays are valid values for any arguments to sample, so I’m not sure why you would want to pass them in in the first place?
If you’re accepting arbitrary keys/values it seems valid to remove any arrays because they can’t do anything useful anyway.

OK, that helps. The message was so obscure, but reading the source makes sense.
Filtering it is, then.
Thanks!