Improve getIntersection performance.

In an application with multiple layers, if some of the layers doesn't have any shapes which are listening at all. Disable layer hit graph could improve performance.