Thanks for the prompt review. A revised patch is attached.