Bug 1008006 - Use a helper to avoid repeated computations of various dependencies. r=gabor