In the Core Rule Book it says Reroll if you get a duplicate special ability, but in the Ultimate Equipment it doesn't say anything of the sort in the magic weapon section of the book, which take precedent.
Most weapon magic abilities don't stack with themselves, so you should usually reroll when you get a duplicate ability on a random magic weapon.
A few things can stack, or be applied multiple times, like Bane, as long as each Bane is for a different creature type, but you can only make a weapon Flaming once.