Harry just had to find where they were. Hermione would probably have compartmentalised everything, knowing her. Harry just had to find the right department. Even if she'd been unconscious when Ron spelled her, there would be a record of it in her mind somewhere. Harry needed only to find the right one, pick up on the vibration, then see if Ron had been as sloppy in his spellwork as Harry would have expected him to. Useless pauper tosspot. There would be a way to reach Hermione's conscious mind that way, and Harry could call for her help.