KNL-1014 Make sure we put a copy in the cache rather than the returned one.

Otherwise the caller may modify the returned object but never persist is and we the return the modified copy to other callers as the copy in the cache is modified as well.

git-svn-id: https://source.sakaiproject.org/svn/kernel/trunk@118535 66ffb92e-73f9-0310-93c1-f5514f145a0a