Adapted the final overlap check to count anything not 0 instead and it succeeded the second puzzle.
Decided to use Rust for this and boy did it take hours... It is a very simplistic program without any fancy whistles. But it runs and succeeded in the puzzle!