Uncanny Dodge, Improved (Grim Alteration)
From D&D Wiki
Improved Uncanny Dodge
With greater focus, his perceptive awareness heightens to an enlightened degree.
Prerequisite: Uncanny Dodge
Description: He can no longer be flanked. This defense denies a rogue the ability to sneak attack the grim by flanking him, unless the attacker has at least four more rogue levels than the target has grim levels.
Special: If a character already has Uncanny Dodge from a second class, the character automatically gains Improved Uncanny Dodge instead, and the levels from the classes that grant Uncanny Dodge stack to determine the minimum level a rogue must be to flank the character.