The way I understood the scene, Luna was able to see the wrackspurts around him. I see it being similar to how flies might be circling an invisible trash can. Luna's beliefs in such things may be considered insane by most of the wizarding community, but I guess that's just how they decided to do the scene. Therefore, I would say it's a plot inconsistency/hole.
In response to those who feel that Dumbledore's ability to immobilize Harry at the end of book 6 is evidence that the cloak does not ward against spells or magical abilities, we must remember that this is Dumbledore we're talking about. Dumbledore is considered the most powerful wizard in living memory, possibly of all time.
- In book 2, it's hinted that he was able to see through Harry's
invisibility cloak in the scene with Hagrid being arrested and
Dumbledore being removed from the school.
- In book 7, it's stated that invisibility cloaks are not infallible,
that the charm or effect wears off over time. Dumbledore rejects the
belief that the hallows were created by 'death' instead believing
they were just created by 3 very powerful wizards.
If that is the case, then it can simply be explained by Dumbledore's petrification spell being strong enough to pierce any protections that the invisibility cloak might have.
However, in book 7 it's also shown that Harry's invisibility cloak was resistant to spells:
- The Thief's Downfall, supposed to remove any magical effects, did not
affect the cloak when they broke into Gringott's.
- When Harry, Ron, and Hermione apparate into Hogsmeade, a Death Eater
hears the noise and attempts to summon the cloak off of them, which
has no effect, not even a minimal one.
Then again, In the beginning of book 6, it's shown that Draco Malfoy used Petrificus Totalus on Harry while he is invisible due to the invisibility cloak, on the train ride to Hogwarts. While Malfoy's abilities are noted to have increased significantly between books 5 and 6, it is all but guaranteed that he was still nowhere near Dumbledore's capabilities. With the events in book 7 displaying the resistance properties of the invisibility cloak more prominently than any of the previous books, I think this is just a plot hole, this time by J K Rowling. As above, a death eater's spell had no effect on the cloak and the Thief's Downfall securing Gringott's from magical intrusion is likely to be a far more powerful effect than Malfoy's Petrificus Totalus.