This error occurs whenever saving permissions fails because the usergroup or userid associated with those permissions does not exist. In that case, the required IDs are not available to use for a query. However, it is not necessary to execute the query if the permissions will not save anyway.
In your case, by creating an area based on another area, you have attempted to copy permissions from an existing area, and the existing area contains permissions for usergroups or users that do not exist. If the new area is a sub-area of the existing one, then the permissions would be inherited anyway.
This error does not prevent the new area from being created or otherwise working properly, but some permissions were not able to be copied from the old area.
Looking at the code changes, this issue has existed for about a year in its current form and about 2 years in its most generic form. It will be fixed in the next build, but based on the frequency and severity of the issue, there doesn't appear to be a need to rush that.
A quick fix would be to edit
vault/core/controller/dm/permissions/vw.php. Find:
Code:
$duplicate_check = vw_DB::get()->query()->select(array(
Before it, add:
Code:
if (!$this->instance->_isset('applytypeid') OR !$this->instance->_isset('applyid') OR !$this->instance->_isset('nodetypeid') OR !$this->instance->_isset('nodeid')) return false;