Sophist fix for min repeat group 0

This is a fix for Jaanus to generalise the min repeat group count code for editing existing records as well as new records.

Status: Tested - ready for code review / retest by Rob/Hugh.

Does not work on Details because +/- buttons don't exist and current approach of mocking the click event will not work. This is left for future fix.