Fix search of package-level function/property usages in Java code
(cherry picked from commit 7d176bdea2d2808ea59527b888dedd99550fa067)