Fixed|R_DeclarePatch: Now assumes a percent-encoded name

This routine was not being used consistently resulting in erroneous
double percent-encoding of names. It is now the responsibility of
the caller to ensure the supplied name is encoded if necessary.