SERVER-10159 Fix invalid dereference of end iterator while parsing invalid field names