Patch from James H to make new-Loopy port more easily. [originally from svn r8174]