Fail to analyze list comprehension code
Chalice does not deploy below code with error message 'key_name'.
If I change the code from item['payload'][key_name] to item['payload']['data'], it works well.

I have used version 1.0.0b1.

```python
@app.route('/data/{node_name}', methods=['GET'], cors=True, authorizer=authorizer)
def retrieve_data(node_name):
    key_name = 'data'
    response['Items'] = [
        { 'Timestamp' : 10, 'payload' : { 'data' : 1}},
        { 'Timestamp' : 11, 'payload' : { 'data' : 2}}
    ]
    stamp = [item['Timestamp'] for item in response['Items']]
    temps = [item['payload'][key_name] for item in response['Items']]
    hums = [item['payload'][key_name] for item in response['Items']]
```

diff --git a/chalice/analyzer.py b/chalice/analyzer.py
index c270aac..2b41f5e 100644
--- a/chalice/analyzer.py
+++ b/chalice/analyzer.py
@@ -565,7 +565,8 @@ class SymbolTableTypeInfer(ast.NodeVisitor):
 
     def _handle_comprehension(self, node, comprehension_type):
         # type: (Union[ast.ListComp, ast.GeneratorExp], str) -> None
-        child_scope = self._get_matching_sub_namespace(comprehension_type)
+        child_scope = self._get_matching_sub_namespace(
+            comprehension_type, node.lineno)
         if child_scope is None:
             # If there's no child scope (listcomps in py2) then we can
             # just analyze the node.elt node in the current scope instead
@@ -577,11 +578,11 @@ class SymbolTableTypeInfer(ast.NodeVisitor):
             ParsedCode(node.elt, child_table), self._binder)
         child_infer.bind_types()
 
-    def _get_matching_sub_namespace(self, name):
-        # type: (str) -> symtable.SymbolTable
+    def _get_matching_sub_namespace(self, name, lineno):
+        # type: (str, int) -> symtable.SymbolTable
         namespaces = [
             t for t in self._symbol_table.get_sub_namespaces()
-            if t.get_name() == name]
+            if t.get_name() == name and t.get_lineno() == lineno]
         if not namespaces:
             return
         # We're making a simplification and using the genexpr subnamespace.
diff --git a/tests/unit/test_analyzer.py b/tests/unit/test_analyzer.py
index 881a33c..c00ae0d 100644
--- a/tests/unit/test_analyzer.py
+++ b/tests/unit/test_analyzer.py
@@ -457,6 +457,17 @@ def test_can_handle_list_expr_with_api_calls():
     """) == {'dynamodb': set(['list_tables'])}
 
 
+def test_can_handle_multiple_listcomps():
+    assert aws_calls("""\\
+        bar_key = 'bar'
+        baz_key = 'baz'
+        items = [{'foo': 'sun', 'bar': 'moon', 'baz': 'stars'}]
+        foos = [t['foo'] for i in items]
+        bars = [t[bar_key] for t in items]
+        bazs = [t[baz_key] for t in items]
+    """) == {}
+
+
 # def test_can_handle_dict_comp():
 #     assert aws_calls("""\\
 #         import boto3
['tests/unit/test_analyzer.py', 'chalice/analyzer.py']