fixed context determination for collection parsing