Maybe does something horrific to your data, but that code is really horrible. Upgrading to 2.5.3 is an option, but uncovers more horrible parts.