Improve the handling of @@identity.