[1.7.x] Fixed #22983: Alert when squashing RunPython operations with referred functions.