Cherry picked nested construction
Merge branch 'master' into npm