[Evaluation] Avoid infinite loop when scanning base types