The MESSENGER spacecraft got the gravity assist it needed from its third flyby, but the flyby did not go perfectly. Four minutes before its closest approach to the planet, the spacecraft went into safe mode where only functions essential for the spacecraft’s survival are left active. Taking pictures is not one of those functions, which means no images of Mercury were taken when MESSENGER made its closest approach.
Fortunately, the MESSENGER spacecraft is fine now, and it still took plenty of images as it approached Mercury.