Fix the "getFrontendModule" hook (see #6921)