Prevent watchdog and warnings from lack of theme hook (3.x)

#5418