JAL-2547 handle contact features 'around' a gap correctly