If the wire at the switch was loose, or the switch retaining bolt was loose, the neutral light might not light up while in neutral, or be intermittent, but it would certainly not cause the light to come on when in gear.
Edit, now that I think about it, if the retaining bolt was loose, and the switch was not fully seated, that could allow the light to come on.