Create adds record to identity map

This fixes the same thing as #46, but with tests and better implementation