Fix bug causing the removal of an attribute within another attribute handler to cause a JS error.