fix Issue 11888 - Incorrect behaviour taking slice from return value