RIS-aided Localization under Pixel Failures