This PR interacts with this feature in a way that needs to you take it into account, specifically these lines: https://github.com/dimagi/commcare-hq/pull/1514/files#diff-2741d99380866b8e6c54177b973c696cR743 and https://github.com/dimagi/commcare-hq/pull/1514/files#diff-2741d99380866b8e6c54177b973c696cR866

Basically, if autoset_owner_id is passed in as true (the previous default) then you need the assertion; if it's false for both those two lines, then you shouldn't add the assertion.

The reason for this is that the assertion is there so that later when you autoset the owner_id inside the form, it doesn't crash when looking up the group. If, however, the person making the app wants to set the owner_id themselves, then we can't do any of this error checking for them and thus shouldn't include this assertion. (They might have a more complex pattern in which there doesn't have to be exactly one group.)