Simplified ExtraJoinRestriction.as_sql