That he was up to no good was irrelevant.
I once was ticketed for being at a park after sunset in our town. The cop explained to my friends and I that if we had just been across the street at the elementary school then it wouldn't have been a problem.
Actually, that depends entirely on which state you live in. Some states under Castle Doctrine allow deadly force to prevent the commission of any felony in your home, including robbery.
That, so far as I know, does not apply to booby traps.
http://en.wikipedia.org/wiki/Castle_Doctrine_in_the_United_S...
Same thing for the burglar school case. If the roofs weren't safe for hvac technicians, why does the burglar win the case? They should at least be able to defend their reason to be there, and the school should be charged seperatley for shifty construction.
The laws have to be apply to everyone for them to be effective.