Nit: seems like we're still susceptible to the case where we saw a `subdir/main.js` as the first entry and never see a true `main.js`. I'm not super concerned about it though.