[BZ-1119731] return null in legacy api when trying to retrieve the FactHandle for an object not present in the working memory
(cherry picked from commit 386dce1443e8404a077e9942f742a2c06cdd87f7)