Fixes bug 828906 - Remove obsolete code using branches table.