OK, #1443 is now closed as this looks cleaner ... could you update your patch with my suggestions above?