Given that I have trouble tracking it down in my own implementation it screams re-write.