Issue
In the dynamic programming for the re-estimation the final logl might differ by a little (due to numerical issues) compared to when its calculated bottom up even if the indel histories did not change. This confuses the optimizer.
Fix
Compare the old assignment with the one from backtracking, if they are the same then do not return the backtracking logl but the one from bottom up.
Note
In the case that the assignment is the same we could assert that the DP logl is not too far off from the bottom up logl
Issue
In the dynamic programming for the re-estimation the final logl might differ by a little (due to numerical issues) compared to when its calculated bottom up even if the indel histories did not change. This confuses the optimizer.
Fix
Compare the old assignment with the one from backtracking, if they are the same then do not return the backtracking logl but the one from bottom up.
Note
In the case that the assignment is the same we could assert that the DP logl is not too far off from the bottom up logl