It shouldn't matter whether or not there is a MinGW installation in /mingw when you build the dependencies. I've done it both ways myself. Again, I have no idea why you would be seeing that error.
To be clear, I have even less time to support building GCC from source than I have to support the use of the TDM-GCC binaries. Building non-Windows-specific software from source, particularly GCC, is *not* a straightforward process on Windows. It requires a lot of trial and error, stubbornness, and the willingness to dig as deeply as necessary into the sources to figure out the problem yourself. Don't expect much help from me.