  The stability to dislocations of the elastic phase, or ``Bragg glass'', of a
randomly pinned elastic medium in two dimensions is studied using the
minimum-cost-flow algorithm for a disordered fully-packed loop model. The
elastic phase is found to be unstable to dislocations due to the quenched
disorder. The energetics of dislocations are discussed within the framework of
renormalization group predictions as well as in terms of a domain wall picture.
