mod/taskchain improve detection of code to handle finish of JMatch Sort