I'm not convinced this is completely correct.

1. Why do you change the behavior for parser grammars? A parser grammar would use a `tokenVocab = LexerGrammarName`, and that lexer grammar name could itself have a `tokenVocab = CustomTokensFile`. It appears that only combined grammars are impacted by the scenario you are describing.
2. Does the condition assume that the imported `tokenVocab` defines tokens which are referenced in the parser? What happens if the referenced `tokenVocab` file is empty, or otherwise does not define a literal which is referenced in a parser rule?