Fixes bug 2114

Adds handling of "leaf" node at the module level.

Change-Id: I55efb47b57d2f33b136b0dae8c82effe04ad706b
Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>
(cherry picked from commit b307c4f621486b193bdb33ad4b9cca52cd47b812)