Fixes vhost.override not being used due to incorrect if check. Fixes #1023