BZ-1072774 - NPE when I register a workitem handler

(cherry picked from commit 304cfa8a0f01583c4840610bf0a1e2b38bee5775)