The Swift mission has discovered an intriguing feature of gamma-ray burst (GRBs) afterglows, a phase of shallow decline of the flux in the X-ray and optical light curves. This behaviour is typically attributed to energy injection into the burst ejecta. At some point this phase ends, resulting in a break in the light curve, which is commonly interpreted as the cessation of the energy injection. In a few cases, however, while breaks in the X-ray light curve are observed, optical emission continues its slow flux decline. This behaviour suggests a more complex scenario. In this paper, we present a model that invokes a double component outflow, in which narrowly collimated ejecta are responsible for the X-ray emission while a broad outflow is responsible for the optical emission. The narrow component can produce a jet break in the X-ray light curve at relatively early times, while the optical emission does not break due to its lower degree of collimation. In our model both components are subject to energy injection for the whole duration of the follow-up observations. We apply this model to GRBs with chromatic breaks, and we show how it might change the interpretation of the GRBs canonical light curve. We also study our model from a theoretical point of view, investigating the possible configurations of frequencies and the values of GRB physical parameters allowed in our model.