Only modifies protected_instance_variables if it is not nil