Problem with equals between inner classes