Fixed #22991 -- Autoreloading *.pyc files

regression of 6d302f639
refs #9722
Thanks lorinkoz and melinath for the reports.