always take last matching next element (issue #74)