Rather than set the animation based on input, you'll want to set it based on the direction of movement.
I also find using an intermediate instance variable works best for setting directional animations. A variable can only ever be one value at any given tick, as opposed to worrying about different combinations of inputs.