Fix a regression made by the fix of ticket #1503