fix for bubble merge and split repeat

@anbangx @Nan-Zhang @JavierJia @Elmira88 
I found and squashed a bug in bubble merge and two in split repeat.  Those patterns seem to be working now.  I'll generate some metrics to be sure, but these should be good to merge in now!