When newdata are the same as training data (i.e., we want to fill in missing ratings in the original training user-item matrix), UBCF (maybe IBCF, I didn't check it) counts the active user as a part of their neighborhood. The code then generates new estimates for the ratings that we already have (i.e., for the ratings of the active user that were in the training matrix) - I'd expect the original ratings to be copied into the output matrix (instead of being generated based on the neighborhood).
When newdata are the same as training data (i.e., we want to fill in missing ratings in the original training user-item matrix), UBCF (maybe IBCF, I didn't check it) counts the active user as a part of their neighborhood. The code then generates new estimates for the ratings that we already have (i.e., for the ratings of the active user that were in the training matrix) - I'd expect the original ratings to be copied into the output matrix (instead of being generated based on the neighborhood).