See http://trac.sagemath.org/sage_trac/ticket/5976.