I suspect that you've flipped the hot & neutral at one of the light fixtures.
In telco parlance, a "crossed pair".
Remove the lamps in the three fixtures and get yourself a good grounding conductor reference (like the ground pin of an extention cord plugged into an outlet that tests out good; or the metal housing of the can light, if that's what you're dealing with). With the circuit off, starting at the fixture first in line from the switch, check continuity between known ground and the lampholder shell. The fixture where you lose continuity is the mis-wired one. The shell should be connected to the grounded conductor...with H and N flipped, the shell would be hot & the button neutral. The dumb lamp doesn't know any better, it'll still work...
You could test the circuit hot using a test light or voltmeter, but it's safer testing it cold, using a continuity buzzer.