Put record in recordCache before calling load on it

Sometimes you may want to override load to extend the way it works. In
such case it will fail when you use any function which uses recordCache,
because it will call load again and you will end up with an infinite
recursion. This commit fixes the situation by putting the record in
recordCache before running load on it.