I'd presume that trespass would apply to this situation, although it would not likely invalidate the lawsuit outright.
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.