My colleague's just told me about this example that has arisen at his partner's work. A director of a limited company has just gone on maternity leave and the month before she went she was paid a £10k bonus. And then for her first month's SMP they have paid her 90% of the bonus month's total, so £9k and claimed it back from the tax office.
My colleague's wife phoned the tax office to check if this was correct and was told that it was. The first six weeks' SMP are based on what she was paid for the last full month before mat leave started, even if it includes an annual bonus.
If this was a loophole I'm sure I would have known about it. Surely the tax office has advised them incorrectly?