If the compass rose on an HSI is frozen or stuck, then the information it gives will be incorrect. However, the ILS localizer indications work independently from the compass rose, and so if the aircraft is on the ILS centreline the needle will be centered.