Thanks go to @ankush for sorting out the hard-coded BOM Level that gave me nightmares. It looks like he is doing a great job fixing a lot of the manufacturing problems I highlighted last year!
https://github.com/frappe/erpnext/pull/26562#issuecomment-885323427
https://github.com/frappe/erpnext/pull/29727
https://github.com/frappe/erpnext/pull/29522