apply fix from JuliaLang/Julia#7913