Inconsistent "UND" value in node fields
I was having the same problem with D7.  The solution for me was to use field_get_items(...) for reading the node data.

$year_items = field_get_items('node', $variables['node'], 'field_year');
$year = $year_items[0]['value'] + 1;


I found the post on Rendering Drupal 7 fields (the right way) very helpful.  It does seem strange that we shouldn't use the $variables provided to the preprocessor and template to read and modify the template variables.  I must be missing something.