Re-rolled patch #33. Attached interdiff for same.