FindPython: ensure virtual environments are correctly handled

Fixes: #19525
4 files changed