Holy crap, it seems to have worked! I soldered the capacitor flush with the board and it seems to be triggering only in the 2-4mm range. I used my 4x7mm capacitor that I had on hand, but the main thing was to make sure light does not bleed under it.
Probably that's what happened when the old one got knocked, a slit was formed under it that allowed the light to pass, even if the electrical connections were not broken.
Thanks a lot @dc42!