I'm pretty sure I've figured it out:
Both the palette and the image is pulled from where you put in the image name, so if you use image "143", it will use palette "143". So if you want to use a certain palette for an image, you would have to change the palette with the corresponding number, or change another palette's name to the image's number.