diff --git a/src/WebformSubmissionForm.php b/src/WebformSubmissionForm.php
index cb5555de..5ba1d16f 100644
--- a/src/WebformSubmissionForm.php
+++ b/src/WebformSubmissionForm.php
@@ -195,6 +195,9 @@ class WebformSubmissionForm extends ContentEntityForm {
    * {@inheritdoc}
    */
   public function form(array $form, FormStateInterface $form_state) {
+    // Add a reference to the webform's id to the $form render array.
+    $form['#webform_id'] = $this->getWebform()->id();
+
     // Check for a custom webform, track it, and return it.
     if ($custom_form = $this->getCustomForm($form, $form_state)) {
       $custom_form['#custom_form'] = TRUE;
diff --git a/webform.module b/webform.module
index 375f8350..9dd409aa 100644
--- a/webform.module
+++ b/webform.module
@@ -532,11 +532,14 @@ function webform_theme_registry_alter(&$theme_registry) {
  * Implements hook_theme_suggestions_alter().
  */
 function webform_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
-  if (strpos($hook, 'webform_') !== 0) {
+  if (strpos($hook, 'webform') !== 0) {
     return;
   }
 
-  if (strpos($hook, 'webform_element_base_') === 0 || strpos($hook, 'webform_container_base_') === 0) {
+  if ($hook == 'webform') {
+    $suggestions[] = $hook . '__' . $variables['element']['#webform_id'];
+  }
+  elseif (strpos($hook, 'webform_element_base_') === 0 || strpos($hook, 'webform_container_base_') === 0) {
     $element = $variables['element'];
 
     if (empty($element['#type'])) {
