ENG-4686 ENG-4861 agreement: deal better with danglers