Support multiple profiles
Patch for recursive sub profile support