Court of Appeals sides with Democrats in redistricting case