Fixed slow SELECT ... FOR UPDATE query when deleting an issue.
Authored by: jplang 2013-12-22
Parent: [r12444]
Child: [r12446]