avoid trying to determine variable id of terms that are not variables - resolves #86