fix interpreter shutdown message

Sometimes, during shutdown, this code is executed when deque no longer exists, which produces an unhelpful error message.