Re-add ability of getCurrentWorker() to get worker from scope argument.

This also makes getCurrentWorker stricter by throwing an exception if no worker
is associated with the current thread or the argument object, or if different
workers are associated with both.