Report deprecated module imports only if root is non-deprecated

Related to issue 13582

https://issues.dlang.org/show_bug.cgi?id=13582