This is a complicated scenario. You really need face to face advice, probably from an employment lawyer, or if you don't have the funds, from someone in FLAC
www.flac.ie
It seems that her position was probably terminated. Staying on as a relief worker does not mean that her position was continuing, actually it means the opposite, ie that her position was terminated and that she entered a new role with different terms and conditions. She may even be entitled to a redundancy payment if the position was terminated!
Whether she agreed this or not is another question, but from a Maternity Benefit position, the question that is asked is whether she is in insurable employment. If she wasn't taking up the offer of relief work, then she wouldn't have been paying a stamp, and therefore not considered to be employed for Benefit purposes. One weekend's relief work in November would have sorted things out if she was in a position to claim Mat Benefit at that stage, but may not apply now.
Don't worry about the P45. It is only a tax document, it doesn't need to be reversed for anything, as she hasn't been paying any PRSI or tax since that time. What needs to be reversed is her PRSI position/employment status.
What also is going to be important is whether there was any break between the date of the P45 and her claiming Illness Benefit. It seems from your description that there was a period when she wasn't working, and not claiming Illness Benefit. If there was a break (even one day), then she likely won't get Maternity Benefit.
If however there was no break, and if she was paying PRSI in the week that she applied for Illness Benefit, she should be ok, again provided that there was no gaps between her Illness Benefit and applying for Materntity Benefit.
I would contact FLAC asap, or alterantively the Irish National Organisation of the Unemployed (01 856 0088) to discuss your case in detail and see what can be done, if anything, at this stage.