implemented index-sensitive checking and added option and tests. other miscellaneous scwala-related changes