This is not a bug. The week number returned is according to ISO 8601 which starts on Mondays and the first week of the year is defined as the one containing the first Thursday of the year.
January 1, 2016 falls on a Friday, so the first week in 2016 starts on January 4.
January 1, 2017 falls on a Sunday, so the first week in 2016 starts on January 2.