Looking in the mirror to adjust Tefillin

Q: Is it permissible to look in a mirror to make sure that one's Tefillin is in the right place?
A: The Shulchan Aruch (Yoreh Deah 182:6) writes that it is forbidden to look in a mirror because of "Lo Yilbash" (not to dress or act in a way like a woman). But the Rama (Yoreh Deah 156:2) says that it is permissible to look in a mirror in order to put oneself together in a place where men have the custom to look in a mirror. It is forbidden, however, for one to make oneself look pretty. This is what Yosef did when he primped his hair and then Satan said: "Now, he is mine" (Rashi on Bereshit 39:6). There are some authorities who rule that a small mirror for Tefillin is a "custom of ignoramuses" (Shut Divrei Chaim vol. 2 Orach Chaim #6, Shut Va-Yoel Moshe Orach Chaim #4 and Shut Tzitz Eliezer 12:6 #2). And other authorities, based on the words of the Rama, rule that it is permissible to look in a mirror to make sure one's Tefillin is in the proper place. It is related in the book "Uvdot Ve-Hanhagot Le-Beit Brisk" (vol. 3, pp. 189-180) that Ha-Griz – Ha-Rav Velevele Soloveitchik – once visited a city and used a mirror to make sure his Tefillin was in the correct place, as was his custom. At his seat, someone placed a copy of Shut Divrei Chaim opened to the Teshuvah which refers to looking in a mirror to adjust one's Tefillin as a "custom of ignoramuses." Ha-Griz said to the people there: "I will use a Chasidic story (since the Divrei Chaim was Chasidic, while he was a Mitnaged). Reb Moshe Leib Sasober once said about the Halachah that one who sits in a Sukkah while it is raining is an idiot (Rama, Orach Chaim 639:7): 'It is worthwhile for me to be called an idiot as long as I fulfill the mitzvah of dwelling in the Sukkah.' I say the same thing: 'It is worthwhile for me to be called an ignoramus as long as the Tefillin sit in the precise spot on my head."