Self-consistent supercell approach to alloys with local environment effects