[2.7] bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864)

(cherry picked from commit 91cb298f811961277fd4cc4a32211899d48bedcb)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
4 files changed