Bug in extract_subchain