Task-5035, fix bug with table join for proxy model and related fields