Stack formation during random sequential adsorption of needles onto a square lattice