checking duplicate loc args; couple tweaks

- error if inferred location substituted contains a duplicate
- for unparsing, switched reftype syntax from *L back to ref(L)
- tweaked genLocVar to generate L%d_%s which is slightly more readable