Replaced stack_mapping with inspection of View.stack_type attribute