Prevent infinite loops caused by input data being close to chunk size, fallback to merging two and two