Just tested it, and can confirm, that reverting that commit indeed prevents the hang in Pathfinder: Kingmaker!