I suspect that this behavior is another aspect of [bug 7723], and was fixed with commit 57ebfa38c979402b6bdca02ab6593e570d963342:
| commit 57ebfa38c979402b6bdca02ab6593e570d963342 | Author: Henrik Grubbström (Grubba) grubba@grubba.org | Date: Fri Jun 17 17:34:34 2016 +0200 | | combine_path: Survive string_builder without NUL-terminations. | | The string_builder API no longer maintains NUL-termination of the | buffer. This caused combine_path_nt() et al to fail intermittently | due to reading past the buffer end. | | Also adds a corresponding test. | | Fixes [bug 7723].