What is the 'scale factor' equation for a dark-matter dominated universe?
You answered your question actually. You have said

Note that this solution is not valid for domination of the cosmological constant, which corresponds to an w=−1

then you are saying

But if 'w' is negative-one then 'a' is proportional to tt

The $w=-1$ does not apply to $a(t) \propto t^{2/3(1+w)}$