Removed dead code and fixed a potential bug. The correct permission index was not being added to various queries.
Removed dead code and fixed a potential bug. The correct permission index
was not being added to various queries.

(Logical change 1.383)


TresysTechnology/setools3,TresysTechnology/setools3,TresysTechnology/setools3,TresysTechnology/setools3