BUG-1514: fixed bug in module sort.

Change-Id: If8e2848ebd45ca6d51201e46928d3b2c0b9426c9
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Merge "BUG-1514: fixed bug in module sort."