This was inspired by the accepted answer to this other question, which stated that
Mormons believe that god arranged pre-existing matter in creation. The matter always existed; creation was an act of organizing the matter.
Now, according to this article at Doctrines & Covenant Student Manual, the LDS belief is also that there is a part of each person, referred to as "intelligence", that has always existed.
The article states the following (emphasis added):
Doctrine and Covenants 93:29. “Intelligence … was not created or made”
The term intelligence can be used to describe “the spirit element that existed before we were begotten as spirit children” (Guide to the Scriptures, “Intelligence, Intelligences,” scriptures.lds.org). However, the Lord has revealed very few details concerning the nature of intelligences. President Joseph Fielding Smith taught:
“Some of our writers have endeavored to explain what an intelligence is, but to do so is futile, for we have never been given an insight into this matter beyond what the Lord has fragmentarily revealed. We know, however, that there is something called intelligence which always existed. It is the real eternal part of man, which was not created or made. This intelligence combined with the spirit constitutes a spiritual identity or individual.
“The spirit of man, then, is a combination of the intelligence and the spirit which is an entity begotten of God” (The Progress of Man [1936], 11).
The "intelligence" referred to in above text are those described in LDS canon such as D&C 93:29...
29 Man was also in the beginning with God. Intelligence, or the light of truth, was not created or made, neither indeed can be.
...and in Abraham 3:18
18 Howbeit that he made the greater star; as, also, if there be two spirits, and one shall be more intelligent than the other, yet these two spirits, notwithstanding one is more intelligent than the other, have no beginning; they existed before, they shall have no end, they shall exist after, for they are gnolaum, or eternal.
The interesting question here is about how this should be viewed in connection with another belief that God himself was once a man. That this is part of accepted doctrine is explained in this article, titled "Is President Lorenzo Snow’s oft-repeated statement—“As man now is, God once was; as God now is, man may be”—accepted as official doctrine by the Church?"
This article says about this belief (emphasis added)
Numerous sources could be cited, but one should suffice to show that this doctrine is accepted and taught by the Brethren. In an address in 1971, President Joseph Fielding Smith, then serving as President of the Quorum of the Twelve Apostles, said:
“I think I can pay no greater tribute to [President Lorenzo Snow and Elder Erastus Snow] than to preach again that glorious doctrine which they taught and which was one of the favorite themes, particularly of President Lorenzo Snow. …
“We have been promised by the Lord that if we know how to worship, and know what we worship, we may come unto the Father in his name, and in due time receive of his fulness. We have the promise that if we keep his commandments, we shall receive of his fulness and be glorified in him as he is in the Father.
“This is a doctrine which delighted President Snow, as it does all of us. Early in his ministry he received by direct, personal revelation the knowledge that (in the Prophet Joseph Smith’s language), ‘God himself was once as we are now, and is an exalted man, and sits enthroned in yonder heavens,’ and that men ‘have got to learn how to be Gods … the same as all Gods have done before.’
The article concludes with
It is clear that the teaching of President Lorenzo Snow is both acceptable and accepted doctrine in the Church today.
Now, continuing on that belief, stated above, that
men have got to learn how to be Gods … the same as all Gods have done before
According to this statement both the current God and all previous Gods had a time when they were not Gods.
At the same time the "intelligence" of everyone has always existed.
Based on this the "intelligences" would always have preceded God in time.
If every God actually had to "earn" their godship (because they all had to go through the stages of "intelligence" > "human" > "God"), we would have, somewhere in distant past, had a situation in which the only thing around would then have been the "intelligences".
What doctrine does the LDS church have, if any, to reconcile this?