you could set a parameter to the bullet.uid when calling the function and use a pick by uid condition..
I think this is the best solution, simple and it should work fine.
if(bullet collides wall)
. .call funtion "destroy_bullet"(bullet.UID)
On function "destroy_bullet"
. .Bullet.Pick_instance _by_ID (Param(0))
. .bullet.destroy;
. .create object(particles at bullet.position)