fix Issue 9537 - auto ref returns a reference its own stack