diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 350e1f83c2..d8b4e6deaa 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -443,10 +443,14 @@ def package_qa_check_buildpaths(path, name, d, elf):
         if tmpdir in file_content:
             path = package_qa_clean_path(path, d, name)
             oe.qa.handle_error("buildpaths", "File %s in package %s contains reference to TMPDIR" % (path, name), d)
-            buildpaths_skip.append(tmpdir.decode())
-        if homedir and homedir in file_content and not any(path.startswith(homedir.decode()) for path in buildpaths_skip):
-            path = package_qa_clean_path(path, d, name)
-            oe.qa.handle_error("buildpaths", "File %s in package %s contains a reference to the build host HOME directory. If upstream hardcodes a directory path that matches your home, you can set OEQA_BUILDPATHS_SKIP = \"%s\" in the recipe." % (path, name, homedir.decode()), d)
+            # If TMPDIR is inside $HOME and this warning fired, so will the one below. Skip that.
+            if tmpdir.startswith(homedir):
+                homedir = b''
+        if homedir and homedir in file_content and not homedir.decode() in buildpaths_skip:
+            parts = file_content.split(homedir)[1:]
+            if any(not p[0:1].isalnum() for p in parts):
+                path = package_qa_clean_path(path, d, name)
+                oe.qa.handle_error("buildpaths", "File %s in package %s contains a reference to the build host HOME directory. If upstream hardcodes a directory path that matches your home, you can set OEQA_BUILDPATHS_SKIP = \"%s\" in the recipe." % (path, name, homedir.decode()), d)
 
 
 QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi"
