Fix a bug caused by position hysteresis. When peaks are initialized for additional fitting it was possible for them to be outside of the image.