Patches for check_nt segfaults on unexpected server response [sf#2991170] [#1061]