Only freeze what needs to be frozen.

Instead of iterating over all the instance variables only explicitly specified
objects should be frozen.