I can see that. Then he might have either a "confinement duplicate" tag assigned by the transporter to keep things straight, or his mass might read unusually to sensors due to its source. In either case they could legally prove he's a duplicate.
What happens then (legally) is anyone's guess. But apparently duplicated humans are authorized to hold rank in Starfleet, or they wouldn't have returned him to duty. So duplicates have at least as many rights as Data has.