Popped path_stack once too many. Should fix #837