Only add a new tensor object if the tensor doesn't already exist.
Authored by: bugman 2009-07-15
Parent: [r9242]
Child: [r9244]