Fixing bug for locating a single view in a query from clause