Use quoted_table_name to allow relation chaining

Closes #4896