Fixed #21825 -- gis compiler uses self instead of qn for as_sql()