remove dangling references to removed table (bug 866000)