I don't see
C_ArtifactUI.GetCostForPointAtRank in your posted code. Perhaps posting all of your code would shed some light.
Because I don't see it, I am thinking you have tainted the global table with a leaking variable. In which case I highly suggest running your Lua files through
this tool.