Fix algorithm for refreshing requirements in the add requirements panel.