Fix for issue #2374

In case no identity field can be determined the generated IDs are returned in a new "anonymous" result.