That's also correct.
Added 43 minutes later
Now I'm playing as a female hero again. Take 6 undead from the pyramid. When you approach the wall behind which the black knights are, have 1000 gold with you. They will exchange it for 6 black knights, while the undead will remain in your army. The knights will appear behind you, click on them, and they will join. This method works. Let's continue.
I'm replaying several times specifically to check. I tried it on a mod with fast movement, and then on the standard 3.1 version.
I consistently get 5 undead from the pyramid, not 6. Accordingly, when I approach the knights, I just click on the gate, and nothing happens.
I freed Richard, but the castle didn't turn into a Knight's castle. Well, of course, I can just continue playing, ignoring these little things, but "It's a pity, isn't it?" (C)