[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.
That's a risky way to handle that case considering str has gained an `__iter__` method in P3.