GH-94851: fix immortal objects refcounting in compiler (gh-95040)

(cherry picked from commit 74761548862eb5a324c23d86a6233d884f386f2e)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
1 file changed