better error message for ambiguously overloaded inner class