Looking for a bug that is causing minor differences in the lengths of gapped extension in the C and C++ versions