I’ve had a similar issue with dragons determining their attacks, including the situation described by the original poster.
I’ve only seen this happen with the dragon in my second slot (Trogdor); it doesn’t happen with the dragon in the first slot, and if it happen with others I haven’t noticed. Depending on how enemies approach, Trogdor will face the opposite direction to make the attack. I’m not sure if this is a graphical glitch alone or if he’s mistaking a negative value for what should be a positive and vise versa; it usually happens in a location where Trogdor is fighting alongside a knight.
I’ll try to get a screenshot and a save file next time I see this.
EDIT: Just attempted to test this again, and got the original bug; Trogdor was situated on a corner and was set to attack fastest and bulldog mode. After the outside corner was cleared, several slugs came through the inside corner. Trogdor did not target any of them with a melee or ranged attack. However, I paused the game to see if it was bulldog mode causing this; after turning it off, he attacked normally, and it did not occur again even after I turned bulldog mode back on.