Fix #15073 Infinite loop with empty namespace