By this definition: "Overfitting occurs when a statistical model describes random error or noise instead of the underlying relationship."(wikipedia), the solution is not overfitting.
But in this situation:
- Test data is a stream of items and not a fixed set of items OR
- Prediction process should not contain learning phase (for example because of performance issues) the mentioned solution is overfitting. Because the accuracy of modeling is more than real situations.