BZ-1067841 Compiled resource objects leak in KnowledgeAgentImpl.register...

- Test case