Reported-by: Alexander Monakov <amonakov@ispras.ru> (cherry picked from commit 546a1ba6)
mentioned in commit 0f82b26a