Fix a long-standing name scoping issue that has suddenly been exposed