DERBY-6496: Fix NPE while loading optional tools; tests passed cleanly on derby-6496-01-ab-useClassFactoryContext.diff.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1574752 13f79535-47bb-0310-9956-ffa450edef68