Fixed Oracle query failures caused by lookup refactor

Refs #21821.