Fixed bug when using accessors as primary key

Looks like it was a copy/paste error between the block dealing with vars and the block dealing with accessors.