Workaround for one of the problems seen in #899