Controversial youth bail changes that were rushed through one state parliament have been criticised by judges as at odds with existing laws.