Preserve error icon

Just check if the icon is the error one, and if so, don't touch the
visibility field