fix wrong test for end of field

regression since 2564c5bbe4acd3f29530b056cef3f6e8ecb6194c

Change-Id: I40741875e873d64a682468616700d25904302878