Sync with changeset #27250. Fixes #37