it can pe passed a nil / empty table if the location stack is empty, return early in this case. Fixes: #12869