propagate name resolution exceptions in the correct thread context