Martha remove the filter cap again and check the threads of were the cap screws into sometimes due to the design of the cap you can get grit which stops you fully screwing the cap in, this in turn stops the machine sealing the manual drain pipe and causes flooding, the reason that it's fine until the end of the spin cycle is that as soon as the spin cycle starts the pump is sucking what water it can up the drain pipe and the waste water non-return pipe until the pump stops then the waer flows back down into the pump housing and sadly out onto your floor..
Miele Edd, April 2010