DERBY-6533: Add more defensive code to NsTest; commit derby-6533-07-aa-moreDefensiveCode.diff.

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