Bug fixes Backported 0fdcc0a to the 7.x release line (2758ed3). Backported d68ba9e to the 7.x release line (dc1781b).