Fix dummy argument aliasing issue
NAG version 6.2 catches a problem with passing the same variable to two
different arguments of a subroutine, one of which is intent(out). The
fix is to use a separate copy of the local variable for one of the
arguments.