Well, bash on windows was bound to be weird! My prompt was run from the standard icon that has target: C:\Windows\System32\bash.exe ~
However, I did an apt-get upgrade before getting your latest reply and this seems to have sorted it. It upgraded these packages...
bind9-host:amd64 (9.9.5.dfsg-3ubuntu0.11, 9.9.5.dfsg-3ubuntu0.12), liblwres90:amd64 (9.9.5.dfsg-3ubuntu0.11, 9.9.5.dfsg-3ubuntu0.12), libdns100:amd64 (9.9.5.dfsg-3ubuntu0.11, 9.9.5.dfsg-3ubuntu0.12), libisccfg90:amd64 (9.9.5.dfsg-3ubuntu0.11, 9.9.5.dfsg-3ubuntu0.12), libbind9-90:amd64 (9.9.5.dfsg-3ubuntu0.11, 9.9.5.dfsg-3ubuntu0.12), dnsutils:amd64 (9.9.5.dfsg-3ubuntu0.11, 9.9.5.dfsg-3ubuntu0.12), libisccc90:amd64 (9.9.5.dfsg-3ubuntu0.11, 9.9.5.dfsg-3ubuntu0.12), libisc95:amd64 (9.9.5.dfsg-3ubuntu0.11, 9.9.5.dfsg-3ubuntu0.12)
I've made your code change and re-built for completeness but my suspicion is that bash on ubuntu on windows is a little flaky,
Thanks for investigating,
Dan