Fixing startsWith to find only subpackages