The legislation recasts transgender persons as objects of suspicion instead of citizens with rights.