We study experimentally and numerically the secondary instability corresponding to the destabilization of stationary transverse roll patterns appearing in a 1D liquid crystal layer subjected to optical feedback. This dynamical instability appears as roll dislocations in the spatiotemporal diagrams. We show that it originates from the Gaussian spatial transverse dependence of a control parameter and that its corresponding mechanism is the selection of a local unstable wave number. This instability is the optical counterpart of the ramp-induced Eckhaus instability observed in hydrodynamics.