Correctly attach hidden values to objects from cached templates.