Build fix for scaffold generator 

3-2 behaves different when scaffolding.
Merge pull request #10496 from arunagw/build-fix-scaffold-generator

Build fix for scaffold generator