Using std::find instead of creating a set (refs #3813)