Avoid needless regeneration of gallery indexes