You can't cheese it to get double bonus, I know that, but I'm not sure how to explain...you know what, one second, I'll do a quick test and give an example:
If you 3-pop whip an IMP Settler that has 8/100

invested you'll end up with 143/100

visibly invested in the build. The city I'm using produces 12

/turn towards the settler, so next turn I would
expect 143+12-100=55

overflow as well as a Settler unit. What I get, however, is only 36

overflow, because (as far as I know)
bonuses do not apply to generated overflow, only to what you're building. I'm not sure how the game calculates things, but that's how it works. Mind you, the overflow that I do generate
is subject to a bonus, so if I invest that overflow into another Settler I'll get 36×1.5=54

invested in the next settler. Or 36×1.25=45

invested into a worker, if I were playing as Joao (EXP/IMP), or tons of hammers invested into a wonder if I'm playing Augustus (IND/IMP), etc.
Pardon if my previous comment wasn't clear, by the way.