Fix for virtualenv support for af-magic theme - fixes #2328, fixes #2297, resolves #2319