use local layer stack to keep track of layers. avoids poisoning the global tiles dict with tiles not yet rendered