Rewrite get_referenced_type/2
Rewrite get_referenced_type/2

Make sure that we continue to follow external references until
we find a real type.

cnbin/otp,saleyn/otp,electricimp/otp,kvakvs/otp,psyeugenic/otp,sitexa/otp,g-andrade/otp,tuncer/otp,sdebnath/otp,cobusc/otp,saleyn/otp,enikki/otp,emacsmirror/erlang,emacsmirror/erlang,electricimp/otp,bsmr-erlang/otp,paladim/otp,getong/otp,stolen/otp,lhslll/otp,sdebnath/otp,sdebnath/otp,dgud/otp,stolen/otp,RJ/otp,benoitc/otp-1,sdebnath/otp,cobusc/otp,getong/otp,erlang/otp,paulcager/otp,massemanet/otp,electricimp/otp,sitexa/otp,RGafiyatullin/otp,jinshana/otp,enikki/otp,stolen/otp,Teino1978-Corp/otp,cnbin/otp,lightcyphers/otp,jj1bdx/otp,Teino1978-Corp/erlang-otp,marquisthunder/otp,jemsbhai/otp,jj1bdx/otp,awetzel/otp,vinoski/otp,dgud/otp,isvilen/otp,falkevik/otp,GinjaNinja32/otp,VincentHHL/otp,krishnakumar4a4/otp,lianghaivv/otp,theom/otp,neeraj9/otp,vladdu/otp,mikpe/otp,theom/otp,derek121/otp,yangchengjian/otp,awetzel/otp,platinumthinker/otp,paulcager/otp,bsmr-erlang/otp,sammoth-wazoku/otp,rlipscombe/otp,paulcager/otp,kvakvs/otp,haguenau/otp,bsmr-erlang/otp,riverrun/otp,theom/otp,sitexa/otp,falkevik/otp,platinumthinker/otp,g-andrade/otp,riverrun/otp,bjorng/otp,RaimoNiskanen/otp,tuncer/otp,lhslll/otp,cnbin/otp,Teino1978-Corp/erlang-otp,neeraj9/otp,derek121/otp,krishnakumar4a4/otp,ahmedshafeeq/otp,johanclaesson/otp,RoadRunnr/otp,ader1990/otp,c-rack/otp,NOMORECOFFEE/otp,GinjaNinja32/otp,sitexa/otp,gjaldon/otp,lhslll/otp,emile/otp,bsmr-erlang/otp,neeraj9/otp,sammoth-wazoku/otp,jinshana/otp,RichMorin/otp,jamesruan/otp,ferd/otp,RJ/otp,dumbbell/otp,jinshana/otp,matwey/otp,platinumthinker/otp,potatosalad/otp,lhslll/otp,getong/otp,platinumthinker/otp,mikpe/otp,mikpe/otp,lrascao/otp,msantos/otp,ferd/otp,entropiae/otp,lantti/otp,awetzel/otp,ahmedshafeeq/otp,riverrun/otp,paulcager/otp,lrascao/otp,beni55/otp,enikki/otp,lemenkov/otp,jemsbhai/otp,fenollp/otp,erlang/otp,VincentHHL/otp,potatosalad/otp,mujiatong/otp,c-rack/otp,potatosalad/otp,platinumthinker/otp,sdebnath/otp,riverrun/otp,NOMORECOFFEE/otp,ahmedshafeeq/otp,gjaldon/otp,basho/otp,aboroska/otp,uabboli/otp,riverrun/otp,RGafiyatullin/otp,haguenau/otp,Teino1978-Corp/erlang-otp,ferd/otp,johanclaesson/otp,RoadRunnr/otp,paulcager/otp,mikpe/otp,stolen/otp,RoadRunnr/otp,c-rack/otp,entropiae/otp,legoscia/otp,schlagert/otp,basho/otp,RGafiyatullin/otp,jamesruan/otp,yangchengjian/otp,falkevik/otp,rlipscombe/otp,potatosalad/otp,fenollp/otp,vic/otp,awetzel/otp,tuncer/otp,getong/otp,aboroska/otp,klarna/otp,massemanet/otp,NOMORECOFFEE/otp,dumbbell/otp,bernardd/otp,lightcyphers/otp,sammoth-wazoku/otp,RichMorin/otp,bjorng/otp,weisslj/otp,RJ/otp,krishnakumar4a4/otp,release-project/otp,haguenau/otp,electricimp/otp,benoitc/otp-1,vinoski/otp,beni55/otp,mikpe/otp,mikpe/otp,RaimoNiskanen/otp,psyeugenic/otp,RaimoNiskanen/otp,c-rack/otp,saleyn/otp,basho/otp,release-project/otp,stolen/otp,benoitc/otp-1,emile/otp,RaimoNiskanen/otp,ader1990/otp,beni55/otp,psyeugenic/otp,dgud/otp,entropiae/otp,yangchengjian/otp,jj1bdx/otp,vic/otp,isvilen/otp,goertzenator/otp,fenollp/otp,neeraj9/otp,mikpe/otp,saleyn/otp,emile/otp,RaimoNiskanen/otp,paulcager/otp,jj1bdx/otp,jj1bdx/otp,NOMORECOFFEE/otp,ahmedshafeeq/otp,vinoski/otp,stolen/otp,Teino1978-Corp/otp,fenollp/otp,bernardd/otp,kvakvs/otp,schlagert/otp,mujiatong/otp,jj1bdx/otp,derek121/otp,msantos/otp,jamesruan/otp,VincentHHL/otp,klarna/otp,krishnakumar4a4/otp,hairyhum/otp,marquisthunder/otp,bugs-erlang-org/otp,mujiatong/otp,massemanet/otp,dumbbell/otp,bjorng/otp,GinjaNinja32/otp,dgud/otp,bsmr-erlang/otp,dgud/otp,sitexa/otp,tuncer/otp,weisslj/otp,ahmedshafeeq/otp,kvakvs/otp,saleyn/otp,theom/otp,theom/otp,schlagert/otp,weisslj/otp,RoadRunnr/otp,isvilen/otp,matwey/otp,hairyhum/otp,vic/otp,enikki/otp,Teino1978-Corp/otp,g-andrade/otp,fenollp/otp,ferd/otp,krishnakumar4a4/otp,krishnakumar4a4/otp,mikpe/otp,marquisthunder/otp,RoadRunnr/otp,RaimoNiskanen/otp,emacsmirror/erlang,Teino1978-Corp/erlang-otp,lantti/otp,klarna/otp,matwey/otp,legoscia/otp,yangchengjian/otp,bugs-erlang-org/otp,ader1990/otp,cnbin/otp,rlipscombe/otp,c-rack/otp,bugs-erlang-org/otp,hairyhum/otp,derek121/otp,RoadRunnr/otp,isvilen/otp,klarna/otp,lemenkov/otp,basho/otp,gjaldon/otp,fenollp/otp,RichMorin/otp,cobusc/otp,rlipscombe/otp,krishnakumar4a4/otp,bjorng/otp,lrascao/otp,falkevik/otp,entropiae/otp,jemsbhai/otp,palas/otp,aboroska/otp,johanclaesson/otp,cnbin/otp,isvilen/otp,klarna/otp,vladdu/otp,GinjaNinja32/otp,erlang/otp,lianghaivv/otp,massemanet/otp,bernardd/otp,vic/otp,dumbbell/otp,lightcyphers/otp,lemenkov/otp,lianghaivv/otp,lightcyphers/otp,uabboli/otp,neeraj9/otp,beni55/otp,jamesruan/otp,electricimp/otp,saleyn/otp,lrascao/otp,benoitc/otp-1,mikpe/otp,krishnakumar4a4/otp,NOMORECOFFEE/otp,johanclaesson/otp,bjorng/otp,tuncer/otp,jinshana/otp,lightcyphers/otp,lrascao/otp,goertzenator/otp,neeraj9/otp,g-andrade/otp,paulcager/otp,lemenkov/otp,cobusc/otp,vic/otp,basho/otp,aboroska/otp,klarna/otp,tuncer/otp,potatosalad/otp,palas/otp,massemanet/otp,getong/otp,goertzenator/otp,erlang/otp,dgud/otp,legoscia/otp,dgud/otp,aboroska/otp,RaimoNiskanen/otp,msantos/otp,aboroska/otp,platinumthinker/otp,cobusc/otp,yangchengjian/otp,enikki/otp,uabboli/otp,goertzenator/otp,mujiatong/otp,riverrun/otp,falkevik/otp,RoadRunnr/otp,matwey/otp,emacsmirror/erlang,fenollp/otp,lantti/otp,marquisthunder/otp,jinshana/otp,lrascao/otp,lantti/otp,sitexa/otp,falkevik/otp,lightcyphers/otp,kvakvs/otp,vladdu/otp,jj1bdx/otp,kvakvs/otp,c-rack/otp,ader1990/otp,dumbbell/otp,derek121/otp,jinshana/otp,weisslj/otp,sammoth-wazoku/otp,Teino1978-Corp/erlang-otp,jinshana/otp,johanclaesson/otp,emile/otp,entropiae/otp,paladim/otp,ahmedshafeeq/otp,lucafavatella/otp,johanclaesson/otp,haguenau/otp,mujiatong/otp,paladim/otp,tuncer/otp,goertzenator/otp,release-project/otp,msantos/otp,isvilen/otp,stolen/otp,GinjaNinja32/otp,RoadRunnr/otp,matwey/otp,RJ/otp,kvakvs/otp,lrascao/otp,bugs-erlang-org/otp,derek121/otp,dumbbell/otp,jj1bdx/otp,kvakvs/otp,bernardd/otp,palas/otp,legoscia/otp,bjorng/otp,rlipscombe/otp,VincentHHL/otp,lightcyphers/otp,RichMorin/otp,lianghaivv/otp,paladim/otp,rlipscombe/otp,RJ/otp,hairyhum/otp,psyeugenic/otp,jemsbhai/otp,emacsmirror/erlang,haguenau/otp,gjaldon/otp,lucafavatella/otp,sdebnath/otp,palas/otp,erlang/otp,bernardd/otp,RaimoNiskanen/otp,derek121/otp,lhslll/otp,gjaldon/otp,ferd/otp,fenollp/otp,RGafiyatullin/otp,derek121/otp,dgud/otp,Teino1978-Corp/otp,VincentHHL/otp,riverrun/otp,matwey/otp,entropiae/otp,lucafavatella/otp,bjorng/otp,uabboli/otp,awetzel/otp,g-andrade/otp,isvilen/otp,RJ/otp,lucafavatella/otp,bsmr-erlang/otp,VincentHHL/otp,enikki/otp,legoscia/otp,cnbin/otp,lucafavatella/otp,tuncer/otp,matwey/otp,basho/otp,psyeugenic/otp,GinjaNinja32/otp,jemsbhai/otp,uabboli/otp,hairyhum/otp,g-andrade/otp,hairyhum/otp,riverrun/otp,lightcyphers/otp,psyeugenic/otp,sammoth-wazoku/otp,palas/otp,lianghaivv/otp,cobusc/otp,emile/otp,paulcager/otp,aboroska/otp,weisslj/otp,RJ/otp,sdebnath/otp,haguenau/otp,haguenau/otp,vinoski/otp,sammoth-wazoku/otp,benoitc/otp-1,rlipscombe/otp,ader1990/otp,Teino1978-Corp/otp,platinumthinker/otp,lemenkov/otp,msantos/otp,matwey/otp,basho/otp,lantti/otp,dumbbell/otp,Teino1978-Corp/erlang-otp,gjaldon/otp,Teino1978-Corp/otp,bernardd/otp,neeraj9/otp,beni55/otp,emile/otp,g-andrade/otp,rlipscombe/otp,RichMorin/otp,NOMORECOFFEE/otp,paladim/otp,bjorng/otp,jj1bdx/otp,stolen/otp,ferd/otp,potatosalad/otp,beni55/otp,vic/otp,lhslll/otp,ahmedshafeeq/otp,electricimp/otp,potatosalad/otp,potatosalad/otp,emile/otp,vinoski/otp,schlagert/otp,potatosalad/otp,c-rack/otp,RichMorin/otp,jj1bdx/otp,lucafavatella/otp,release-project/otp,erlang/otp,weisslj/otp,vladdu/otp,marquisthunder/otp,vic/otp,bernardd/otp,lhslll/otp,vic/otp,erlang/otp,vladdu/otp,lrascao/otp,RGafiyatullin/otp,electricimp/otp,psyeugenic/otp,basho/otp,hairyhum/otp,electricimp/otp,legoscia/otp,RGafiyatullin/otp,vinoski/otp,getong/otp,cobusc/otp,vinoski/otp,jemsbhai/otp,dgud/otp,klarna/otp,Teino1978-Corp/erlang-otp,erlang/otp,paladim/otp,awetzel/otp,lantti/otp,hairyhum/otp,potatosalad/otp,klarna/otp,bsmr-erlang/otp,johanclaesson/otp,mujiatong/otp,release-project/otp,vladdu/otp,palas/otp,cnbin/otp,RJ/otp,jamesruan/otp,yangchengjian/otp,saleyn/otp,lrascao/otp,legoscia/otp,palas/otp,tuncer/otp,RichMorin/otp,saleyn/otp,aboroska/otp,jinshana/otp,lantti/otp,sammoth-wazoku/otp,g-andrade/otp,theom/otp,bugs-erlang-org/otp,jamesruan/otp,dumbbell/otp,isvilen/otp,benoitc/otp-1,vladdu/otp,rlipscombe/otp,lemenkov/otp,falkevik/otp,emile/otp,NOMORECOFFEE/otp,isvilen/otp,marquisthunder/otp,enikki/otp,kvakvs/otp,schlagert/otp,Teino1978-Corp/otp,bugs-erlang-org/otp,goertzenator/otp,mikpe/otp,matwey/otp,uabboli/otp,basho/otp,msantos/otp,msantos/otp,mujiatong/otp,legoscia/otp,g-andrade/otp,awetzel/otp,vinoski/otp,dumbbell/otp,getong/otp,ahmedshafeeq/otp,release-project/otp,weisslj/otp,gjaldon/otp,release-project/otp,gjaldon/otp,psyeugenic/otp,NOMORECOFFEE/otp,emacsmirror/erlang,bernardd/otp,awetzel/otp,electricimp/otp,weisslj/otp,RGafiyatullin/otp,goertzenator/otp,getong/otp,massemanet/otp,saleyn/otp,getong/otp,vladdu/otp,bernardd/otp,haguenau/otp,ader1990/otp,jamesruan/otp,entropiae/otp,RoadRunnr/otp,benoitc/otp-1,fenollp/otp,lhslll/otp,erlang/otp,emacsmirror/erlang,lemenkov/otp,lucafavatella/otp,mujiatong/otp,sammoth-wazoku/otp,erlang/otp,ferd/otp,goertzenator/otp,g-andrade/otp,VincentHHL/otp,ferd/otp,Teino1978-Corp/erlang-otp,johanclaesson/otp,legoscia/otp,GinjaNinja32/otp,cobusc/otp,falkevik/otp,ader1990/otp,bjorng/otp,enikki/otp,ahmedshafeeq/otp,vinoski/otp,entropiae/otp,massemanet/otp,ader1990/otp,emacsmirror/erlang,paladim/otp,VincentHHL/otp,RaimoNiskanen/otp,lemenkov/otp,beni55/otp,palas/otp,RichMorin/otp,sitexa/otp,lianghaivv/otp,RGafiyatullin/otp,getong/otp,aboroska/otp,schlagert/otp,beni55/otp,emile/otp,jamesruan/otp,uabboli/otp,rlipscombe/otp,cnbin/otp,dumbbell/otp,jemsbhai/otp,yangchengjian/otp,marquisthunder/otp,schlagert/otp,theom/otp,bugs-erlang-org/otp,marquisthunder/otp,msantos/otp,Teino1978-Corp/otp,lianghaivv/otp,massemanet/otp,yangchengjian/otp,vinoski/otp,vladdu/otp,lantti/otp,schlagert/otp,bugs-erlang-org/otp,bjorng/otp,platinumthinker/otp,lianghaivv/otp,release-project/otp,lucafavatella/otp,theom/otp,dgud/otp,massemanet/otp,sitexa/otp,bsmr-erlang/otp,jemsbhai/otp,paladim/otp,sdebnath/otp,c-rack/otp,weisslj/otp,goertzenator/otp,ferd/otp,emacsmirror/erlang,neeraj9/otp,release-project/otp,falkevik/otp,uabboli/otp,uabboli/otp,benoitc/otp-1,bsmr-erlang/otp,isvilen/otp,GinjaNinja32/otp,emacsmirror/erlang