Material Index pass and object index pass not working at all

My setup is fine. But why the image is black or white? Why the masking is not working?

I want the headlight to glare, so I gave it a pass of 1. But it’s not working. I also tried he material index, it’s not working either.

Because it is occluded by another object.
https://blender.stackexchange.com/questions/103310/how-to-utilize-material-or-object-index-behind-a-refractive-material-in-cycle/104367#104367

:pensive: Gotta try different method.