Rerun the `Theme` class logic upon Ajax changes (see #5776)