Your dma to sprite palette memory is 32*32 bytes (1024 bytes). Sprite palette memory is only 512 bytes (256 colors) so the dma is overwriting the 512 bytes following sprite palette memory...which happens to be background palette memory. This is why re ordering the dma appears to fix the problem.
Could you give us a usage example for why this would be of benifit? Loading textures on the DS can be somewhat non intuitive...really what we need is an entirely new texture management system decoupled from the ill suited GL system. I am not against such an addition and it would be rather trivial to...
its actually the tile which selects which palette to use. each tile index has four bits for choosing a palette so a single layer can actually contain 4k unique colors with each tile containing up to 256. finding map and tile tools to take advantage of this would be challenging though.