Fixes Scaffold generator with --assets=false

Scaffold generator with --assets=false option 
outputs an error

See #9525