Taking a graduate version of a course I took in undergrad
You said your exact problem is solved, but I want to answer in a more general way.

PhD admissions are not uniform or even consistent year-to-year. Additionally, the at some departments, the professors who are on the admissions committee change year-to-year. Thus there is no magic bullet for admission into a PhD program.

In my opinion, someone like yourself who has undergraduate research experience, will be in a situation where the admissions committee won't care about your exact courses on your transcript. Your GPA may or may not matter, depending on the whims of the admissions committee.

Most likely your success with applying is a completely subjective decision made by people: and like all people they are biased and irrational. I am not trying to be insulting. All I am saying is that you cannot expect a process which is subjective to work like a deterministic computer program: where the same inputs result in the same outputs; where if you change your initial conditions slightly, but taking a graduate course, your outcome will be affected by it.

I will also add that some PhD program/departments may have objective thresholds. For example a GRE minimum score, and no matter how strong the result of your application is, if you scored lower that the threshold, your application is thrown out.