Added inheritance support for table queries and scans.