fix Issue 8307 - inconsistent treatment of auto functions
fix Issue 13336 - auto ref return deduced to be ref despite return value coercion