Proper fix for #480916: only use cached node type when processing comments also for mail and pdf links