Re-apply the infamous r108614, with a fix pointed out by Dirk Steinke.