Fix nasty bug in generate_field_value that caused it to ALWAYS return None.