Prevent LuaException when querying a dead actor's traits in TriggerGlobal

Fixes #6454 

#6377 adds another method to this file which also needs to be fixed this way. Depending on the order these two PRs will be merged, one has to be modified accordingly.