Fix compiler warning.

Refs #5245
Fix WorkQueue lock contention.

Fixes #5245