Add return of implicit gates.
Merge branch 'develop' into coverity-scan