I fixed the problem by changing the offset from 1 to 2. Seems to work but I have no idea what else it might break!
function getFirstDayOfWeek($year, $weeknr)
$offset = date('w', mktime(0,0,0,1,1,$year));
$offset = ($offset < 5) ? 2-$offset : 8-$offset;
$monday = mktime(0,0,0,1,1+$offset,$year);
return strtotime('+' . ($weeknr - 1) . ' weeks', $monday);