Why does accessing a protected static inner class X of a superclass Y fail with "error: class X cannot be accessed in object Y"?