Account for iterator valid() being false when calling current()

This should never happen, but Scrutinizr is moaning.