[GHC] #13305: static: check for identifiers should only consider term level variables