Eng 6012 inexists sp

The problem here is that the same 'equal' method is always used to compare TVEs including an index selection. A TVE from the catalog index won't have a stmtId set but still needs to be matched to a corresponding TVE from a real table for index to be chosen. For all other purposes, the m_origStmtId should be considered.
Ideally, JAVA should provide containers that can be parameterized by the equality predicate similar to the STL, but I don't think it's there. 

we need two 'equals' methods (one that takes a origStmtId into a consideration and another that doesn't) and use them with