[#1595] Implement a new pass interception algorithm

Closes #1595

See merge request main/Sumatra!1393

sumatra-commit: 1209677e78ed415486a0c4d6973a00cb6c510a7c
3 jobs for master in 6 minutes and 40 seconds (queued for 3 seconds)