Your medieval jurisdiction may vary, but the “eww, gay” response played differently then than it does among contemporary homophobes. The act of buggery (or whatever term for hot man-on-man action) was a no-no, although winked at in a lot of circumstances. (I mean, it’s one thing if you’re away on the Crusades—what happens in Constantinople stays in Constantinople—but don’t do it in the local churchyard.)
But just getting a boner in the company of men? Nah. Particularly not when the point was to prove that a boner was physically possible for the man in question. Medieval legal proceedings are often surprising for the extent to which they are about technical points of compliance with this or that arcane law, and not about burning witches.