issue 6857: Fix the code after the last merge with master