Fixed variable reference in detecting mb encoding.