There is not anything wrong with your script.
I.e. 2012-01-01 was part of week 52. The same issue is found with 2011-01-01 and 2006-01-01.
How do you think it should be solved? Do you want to move the date to the next week, or what do you see as solution that makes sense?
It can be solved....the question is, why and how?
Week() funtion will return '52' for '01/01/2012' and '52' for '30/12/2012'.
Also will return '1' for '01/01/2013' and '1' for '30/12/2013' it depends if the first week of the year takes more days from the ending of the last year or the starting of the new.
To avoid this you can use in script an expression like:
Ceil((Date-YearStart(Date)+WeekDay(YearStart(Date))+1)/7) --> This will return a week number starting by 1 and ending by 52-54
you can view the blog
Redefining the Week Numbershttp://community.qlik.com/blogs/qlikviewdesignblog/2014/01/27/week-numbers