The patch was created by Matt Helsley for 2.4 and has been changed slightly to match 2.6. The implementation compromises performance for correctness. -Arun