Yep, dyes penetrate into the wood, so putting them on top of the shellac (it is done at times) doesn't get you the same coloring. Then putting the varnish on is the normal order. Now, if the dyes are alcohol based, putting shellac on them is a really bad idea (it redissolves the dyes and makes a mess. Also, a lot of folks go straight over the dyes with the varnish. I prefer to use the shellac easy enough to do and still gives a good look. But I suspect it's use in sealing the dye is more useful when the topcoat is a waterborne. Putting that on a water based dye is akin to putting shellac on an alcohol based dye.