I think this is Bamford-Stevens not Shapiro.
Shapiro uses 2 equivalents of BuLi while Bamford-Stevens uses "base" in general, so can be done in protic or aprotic solvents. Both go through a Diazo intermediate, depending on conditions this may make a carbene (aprotic) or a carbocation (protic).
So imagine a carbene or carbocation was formed where the N attaches to the ring. How would that lead to what you find?