change alternative context check to use the recursive logic
change alternative context check to use the recursive logic

informatics-isi-edu/ermrestjs,informatics-isi-edu/ermrestjs,informatics-isi-edu/ermrestjs