The java.awt.Container.getMouseEventTargetImpl method is being called w/o holding the TreeLock (say, when it gets invoked from within the LightweightDispatcher).
However this method deals with the component hierarchy. The same reason caused us to use this lock in the hw/lw mixing code (see 4811096). And actually this lock is required to fix the 5062995 (shaped windows and components), because the contains() method should fall back to the mixing code in order to get the shape of the component and determine whether it contains the given pixel.