I think your logic is incorrect here.  I still think we want what I  proposed in patch set 1's comments:

  if (c.has(UNSHALLOW))
    p.add(UNSHALLOW);
  if (c.has(UNINTERESTING)) {
    if (p.has(UNSHALLOW))
      c.add(BOUNDARY);
    else
      p.add(UNINTERESTING);
  }

With renaming your REINTERESTING flag to be BOUNDARY.