Merge "Dedup registration code for module types and singletons" am: 65b174c9c7 am: dffc72bf4e

Change-Id: Ibc9a08348e838fa3b2e45c108de2a996a2641085