Fix shadowing of time module

Fixes #12645.