Bug 25497 really should have been branched from stable, so backport it.