sge.SGEPlugin: Move the SGE source check for better code reuse.