lua: workaround false positive dereference of null pointer