renaming max-index to max-nesting-level to better represent what it does