Don't access time_pos[i] and time_neg[i] if not defined.

valgrind revealed that time_pos[i] and time_neg[i] were being accessed when not necessarily set.  Since they are only used to decide wether to set keep_pos[i] and keep_neg[i], and those in turn are only used when time_pos[i] and time_neg[i] to help set two_good_times[i], I moved things around so that they don't get accessed if not set.

This is all part of some hack that I don't understand, I want someone else to agree to this change.