[BUG #8617] ported changes to 'next' branch