Change getNextCapturedScope to getParentScope (aligns with getNthParentScope name and it makes more sense as a name).
Bad merge from the other week where an extra fileResource was left around