fix nasty bug in discovery process
fix nasty bug in discovery process

bsmr-erlang/relx,priestjim/relx,tsloughter/relx,ethercrow/relx,erlware/relx,zugolosian/relx,lrascao/relx,timclassic/relx,umatomba/relx,RJ/relx,ingwinlu/relx,Licenser/relx,bitwalker/relx,syl20bnr/relx