Refactor to no longer shadow built-ins of min and max
Merge pull request #9009 from cachedout/#8972

Refactor to no longer shadow built-ins of min and max