Job 19:27 is translated by the NIV with "heart":
The psalm actually says "... who probes hearts (leb) and kidneys (kilyah)". The issue here is that the same translators who wanted to translate kilyah with "heart" can't do that here, otherwise you end up with a God who probes hearts and hearts. Since the Job author has the kidneys yearning, it seems at first glance that either mind is not the most suitable translation here, that the "yearning" of Job is misleading, or that despite its limited symbolic use, kilyah somehow trumps leb here in Psalm 7:9. In this last scenario, the translators have allowed kilyah to be translated heart, and leb steps aside to become "mind". But that's highly unlikely. So why might translators invert the order if both the Hebrew and the subsequent LXX both have it in the order of hearts then kidneys? The answer, I suspect, is actually in Revelation 2:23 - translators wish to create extra alignment with the word order assigned to the function of the Son of God as expressed in the final book of the Bible. Regardless, Psalm 7:9 shows that both the kidneys and the heart are deep inner spaces into which the God Yahweh has and wants access.
When my heart [lebab] was grieved and my spirit [kilyah] embittered
For you created my inmost being [kilyah kilyah]; you knit me together in my mother’s womb.
Please also note: all NIV citations today, unless otherwise stated, are from the modern revised NIV usually copyrighted 2011, with my substitutions of Yahweh for "the LORD".