We study a flux lattice which is parallel to superconducting layers, a
llowing for dislocations and for disorder of both short wavelength and
long wavelength. We find that the long-wavelength disorder of strengt
h <(Delta)over tilde> has a significant effect on the phase diagram -i
t produces a first-order transition within the Bragg glass phase and l
eads to melting at strong <(Delta)over tilde>. This then allows a Frie
del scenario of 2D superconductivity.