This was a slight difference from Blodwen that wasn't accounted for - there might be lets in the nested environment, so when building the expanded application type, make sure we go under them