Clean up definition creation.

@bug W-2313727@

@rev byao@
Merging origin/goliver/master-pending-def-cleanup-2 into master