The previos algorithm was just incorrect, it rewritten the central line multiple times (due to the shared value in lambda) :( BUG:442796