It looks to me like dirt/sludge from the C41 processor had become attached to your neg. This can happen if the processor is not maintained correctly, the cross over racks washed at the end of the shift/evening, the wash tanks and filters cleaned regularly etc.
As you said it was near the end of the film, frame 20 or so on a 24exp film, it sounds to me that it's the wash tanks are dirty, they have scum on the walls of the tank. Your film usually is leader card fed in most minilab processors. After the film end has been cut in the processor the film is pulled through the different processing tanks (sounds worst than it is, the film only touched the processing rack guides at the outer edge of the film). Beacuse the wash tanks are small, when the end of the film is exiting the rack it can spring out a little and brush against the tank wall gently. If the tank wall is clean then no harm is done but if it has a build up of slime then this can cause the problem.
I would bring them back to the mini lab and ask that they rewash your negs and redo your prints/scans (they can do this very easly compared to you trying it at home).