We're on our way to a clean 404 error, but we don't want to
hit a JavaScript error along the way.
     return;
   }
 
-  request.game = lmno.ids[game_id].game;
-  if (request.game === undefined) {
+  /* See if there is any game with this ID. */
+  const game = lmno.ids[game_id];
+  if (game === undefined) {
     response.sendStatus(404);
     return;
   }
+
+  /* Stash the game onto the request to be used by the game-specific code. */
+  request.game = game.game;
   next();
 });