The error is on or about line 232 of transaction.cpp -
blocks=std::min(ONEYEAR,valuationHeight-outputBlockHeight);
The code should also check that the number of blocks being rewarded is not greater than the term deposit time but does not.
Here's an example of what it means in practice.
Let's say you make a term deposit of 100 HODL for 2 months.
What should happen is that after 2 months your deposit is unlocked and ceases to earn interest.
What actually happens is that after 2 months the deposit is unlocked but continues to earn interest for up to a year. The interest multiplier still uses the 2 month period bonus, so someone locking for say 6 months would still earn more than someone who locked for 2months and got the unintended extra interest.
I propose a hard fork to correct this problem - to simply say after block X, the additional interest is no longer recognized. Another alternative is to leave it as it is. It's not really a showstopper, but I think the intended behavior is superior so is worth the fork.