Avoid duplicate entries using a sign change This anecdote contains the following intriguing exchange: 


  "Fine, Fred," Avi interrupted. "Then how would you change this to
  avoid duplicate entries?"
  
  "Oh, just change that one there to a negative one."


While this claim is not accurate in context, I do wonder if there's some plausible code for which that makes sense.

Your challenge is to write code (a program, a function, whatever) that fits this criteria:


Merges two input lists into one, keeping duplicates. [edit: You can optionally assume that they are integers, and/or that the lists themselves are unique. You can't assume the integers are positive (the one answer that does this is grandfathered in).]
A literal "1" appears somewhere in the code. If you change this to a literal "-1", the code does the same thing but removing duplicates.
The code does not simply branch off of the 1/-1. We're not looking for if (1 &lt; 1) removeDuplicates() or [do_nothing, merge_with_dups, merge_without_dups][1].call(), for example.


Input and output can be in any reasonable format you choose. One example might be 

[1,2],[2,3]-&gt;[1,2,2,3] before the sign change, and [1,2,3] after.

This is a popularity contest. It is not code golf, unless you want to show off. I'll accept the highest-voted answer in about two weeks.
JavaScript

Take a conventional algorithm and write it with a bug:

function merge(a, b) {
  var ai = 0, bi = 0, oi = 0;
  var o = [];
  while (ai &lt; a.length &amp;&amp; bi &lt; b.length) {
    var v = a[ai] &lt; b[bi] ? a[ai++] : b[bi++];
    if (v !== o[oi + 1]) {
      o[oi++] = v;
    }
  }
  while (ai &lt; a.length) o[oi++] = a[ai++];
  while (bi &lt; b.length) o[oi++] = b[bi++];
  return o;
}


This code contains exactly one literal 1. If it is changed to -1, then duplicates will be removed. It can be used on any comparable values.