Further decrease WQ lock contention.

Refs #5246
Avoid using dynamic_pointer_cast when possible.

Refs #5246
Fix compiler warning for Utility::GlobRecursive.

Refs #5246