Correctly propagate thread-local flag from aliasee to alias. This fixes PR2137