Minor logic change to ecom upgrade scripts 'needed' method