Fix indentation when multiple nested scopes are involved

use `rangeContainsStartEnd` in implementation of `getContainingList` to determine if node range is in list range. this fixes #1201