I noticed a difference when running the R code and the C++ code path: in the latter, I sometimes get the error:
Error in RSS.table[as.character(opt[1]), i] : subscript out of bounds
This comes from breakpoints(), extract.breaks(), which implies that the RSS.table is not the same size as it would be in the R implementation (as I have never run into that problem in the R code path). I'll try and get an example time series for that.