The afterglow emission that follows gamma-ray bursts (GRBs) contains valuable information about the circumburst medium and, therefore, about the GRB progenitor. Theoretical studies of GRB blast waves, however, are often limited to simple density profiles for the external medium (mostly constant density and power-law R−k ones). We argue that a large fraction of long-duration GRBs should take place in massive stellar clusters where the circumburst medium is much more complicated. As a case study, we simulate the propagation of a GRB blast wave in a medium shaped by the collision of the winds of O and Wolf–Rayet stars, the typical distance of which is d∼ 0.1–1 pc. Assuming a spherical blast wave, the afterglow light curve shows a flattening followed by a shallow break on a time-scale from hours up to a week after the burst, which is a result of the propagation of the blast wave through the shocked wind region. If the blast wave is collimated, the jet break may, in some cases, become very pronounced with the post-break decline of the light curve as steep as t−5. Inverse Compton scattering of ultraviolet photons from the nearby star off energetic electrons in the blast wave leads to a bright ∼GeV afterglow flare that may be detectable by Fermi.