+1, have 2 implementations that each have an independent branch point? if you combine them you have a function with 2 bool parameters, and 4 possible states to test, 2 of which you might never need
You really don't want to have a function that branches a lot inside. It's very difficult to test.
When you think of adding a flag, run in your head 2^n, this will give you the least number of tests needed. Do you really want to write all of them?