Fix a minor issue with 'nextFieldName()' implementation, based on added test