Now it really does what it says on the tin. (cherry picked from commit c189e27f39f25982f5b9d808b7af0e11f57074ef)