The weight, $W$ (the same $W$ as in Boltzmann formula $S=k\text{ln}W$) of a configuration {$N_0, N_1, N_2$, ...} is given by
$$W=\frac{N!}{N_A!N_B!N_C!...} \tag{1}$$
where $N$ is the total number of molecules in the system and $N_j$ is number of molecules with state $j$.
The denominator is to account for different permutations of indistinguishable molecules. For example, molecule labelled 1 and 2 below have exactly the same energy and are of a same element. If the sample is a perfect gas, molecule 1 and 2 will be indistinguishable. The simple N factorial overcounts by counting such many different permutations which are indistinguishable multiple times, and the denominator in (1) is to correct this. Molecule 1 and 3 are distinguishable; they have different energies.
If we proceed to operate on (1) using Stirling's approximation and through some simple algebraic manipulations, the equation for entropy below can be deduced:
$$S(T) = \frac{U(T)-U(0)}{T}+Nk\text{ln}q \tag{2}$$
Because (2) is derived from (1), (2) has already taken into account of different permutations of indistinguishable molecules, just like (1).
Now here is the question, the entropy of perfect gas is actually given by
$$S(T) = \frac{U(T)-U(0)}{T}+Nk\text{ln}q -Nk(\text{lnN}-1)\tag{3}$$
(3) is derived using canonical partition function and
$$Q = \frac{q^N}{N!} \tag{4}$$
which is true for independent, indistinguishable molecules.
(2) can be reached similarly, but using
$$Q = q^N \tag{5}$$
which is true for independent and distinguishable molecules.
What is wrong with the argument above? I thought (2) has already accounted for the fact that the molecules are indistinguishable, but proven otherwise by canonical partition function, or did I understand the indistinguishability wrongly.