This isn't my area of expertise, so someone else might be able to provide a better answer or more references, but as I understand it there are two issues here, one to do with the particular circumstances of William's 'invasion,' and one to do with British conceptions of our own 'history'.
The simple/traditional answer - ie. the argument that allows one to maintain that England has never been invaded, is that William and Mary were 'invited' to depose the Catholic James II/VII by a group of English peers on behalf of a population which was 'dissatisfied with the present conduct of the government in relation to their religion, liberties and properties.' On this basis, the Dutch army can be seen as only part of what was mainly a civil conflict, and thus it doesn't really 'count' as an invasion.
However, to an extent you have already answered the question yourself - the idea that England has never been successfully invaded is a brag, and isn't actually based in much fact; there are plenty of further examples of successful foreign invasions of England, unless one uses an extremely strict definition of invasion. Throughout the middle ages, for example, numerous Scottish armies successfully fought campaigns in England with control over border regions changing hands repeatedly until around 1482, when the English last conquered Berwick-upon-Tweed. Even if we insist on an invasion requiring a change of government, there are further obvious examples. The future Henry IV, for example, took the throne from his cousin Richard II after being exiled to France and making an alliance with the Duke of Orléans, who controlled the French court. Similarly, Henry Tudor had barely even visited England before he left France with a fleet of English exiles and French and Scottish soldiers to take the throne and end the wars of the roses.
The Tudor example in particular once led my venerable old medieval history tutor to use some less than elegant words to describe the 'little Englanders who maintain that our fair isle has never been sullied by foreign boots'. At the time, I mostly found this amusing because lol teachers swearing, but actually the fact that this myth has developed is interesting in itself. Alas, I have no idea where it came from, so would be interested to hear if anyone else knows.
Sources
The 1688 letter of invasion to William of Orange is in Browning, English Historical Documents, 1660-1714
Oxford Dictionary of National Biography entries on Henry IV and Henry VII are very good for basic info on their rise to the throne