Fix unnecessary shadowing pylint error #14529

Fix bug #14529