If line 7 of frame 20 is the line...
then chances are the problem is that gallery_mc is not being found. Try putting a trace to see if that's the culprit. Try putting: trace(galleryContainer_mc.gallery_mc); before that line and see if it comes up undefined/null. If so, try to reason out why it might not exist when that line executes.
The response to the trace was "undefined."
I wasn't able to find the problem, other than Flash didn't like the use of Frame Labels (it kept telling me the label didn't exist, when it did....) But Flash did like the use of the frame number. Also, I cut the layers from within gallery_mc and put them on the main timeline.
I cannot tell from your followup if this is the case, but if gallery_mc happened to be in a different frame than whatever frame galleryContainer was at, then the error would occur. It could also occur for any reason wherein the gallery_mc object does not exist (yet) as far as the code is concerned... such as gallery_mc...
- is declared but not instantiated
- doesn't have an instance name (or the instance name is mispelled)
- is animated into place but is not assigned instance names in every keyframe for it
- is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).