The template is already parsed into raw PHP in the cache. You need to do the same. Or you could just put the conditional outside and save yourself some processing.
PHP Code:
if ($vbulletin->options['banhome_enabled'] AND is_member_of($userinfo, 8))
{
$find = '<!-- Ban Home Begin -->';
$replace = 'Home Page Removed';
$vbulletin->templatecache['memberinfo_block_contactinfo'] = str_replace($find, $replace . $find, $vbulletin->templatecache['memberinfo_block_contactinfo']);
}