Fix created as per Issue 853.
Adjust fix to cope with non-root J installs