Remember when I was complaining yesterday about the dock in 10.5.2? Well don’t I feel silly.
I guess I didn’t really bother looking for an answer, because 30 seconds on Google got me a forum thread about this very subject. To use the folder’s icon in the dock, you just need to remove it and re-add it to the dock, or switch it from folder view to stack view and back again. For some reason though, restarting the machine won’t do it (I tried that first, just in case).