BZ-1032206 - NPE when accessing tasks using a RuntimeEngine without persistence

(cherry picked from commit 66a00615ccb8ddc863e9f0023db209d9fd18e7d1)