It appears to work as expected within the precomposition but when I go back to the main composition the lighting effect has gone.
As it should be. Layers with CT will only use the lights from the topmost composition.
However when I try and add a light to my main composition, it only effects certain layers.
You have applied layer styles or use 2D layers/ adjustment layers inbetween and those break 3D rendering order. That, by all means, is also "as designed" and explained in the help.
Thanks for your quick response however it does appear to be a bug. I have since discovered that if I render the movie out the lighting behaves as expected. The problem appears to be some sort of previewing issue.
Just thought I'd let anyone else know who might be experiencing the same thing.
Are you using the OpenGL renderer for previews? If so, turn it off.