Optimizes reference resolving when using SQL source tables.