[IMP] expression.py: add a check to forbid records in domains

Records in domains cause a "maximum recursion depth exceeded" error when
converted to SQL. Simply add a test to show a better error message.

Fixes #3022.
Because `isinstance(param, collections.Iterable)` returns `True` on strings, while `isiterable(param)` returns `False`...