I think the problem is that when you removed this line, if the block above is false, then nothing is returned by this method.  

    pending_ops << ...

is a side effect of returning pending_ops, so with the removal you're not returning pending_ops from this method if the block above is not entered.  Adding:

    pending_ops

should be enough.