Bewildered at his circumstance, he asks the lion king how he, who spent his whole life in service to another, could end up in this place. The lion explained that the whole time the soldier had been praying to the bird god, he had actually been praying to the lion king. The bird god was no more capable of accepting praise than the lion king was of accepting a curse. Both praise and scorn reach their proper destination. Buddha posited a corollary to this at his Sermon at Benares: If you try to spit at the heavens, the spit just falls on you. Everything goes to its proper place.
In this profoundly hopeful and inclusive message, Lewis seems to be saying that the righteousness of your dedication to a life of humble service to ANY god will be sufficient once the time of reckoning comes.
It has been said that trying to grasp any aspect of God is like trying to grasp an ocean with the thimble of our minds. I believe that this same fundamental incomprehensibility provides the basis for the panoply of religions. It is so beyond man's capacity to truly accept and embrace something as large as a brotherhood of man that it becomes inevitable that we embrace the lesser view that only a small segment of people, regardless of their divine origin, will have access to God.