I have exactly the same problems on a brand new MBP Retina:
1. Lights not appearing in the dock even if the applications are active.
2. Lights still appearing in the dock after the application has been closed.
3. Running applications not appearing in the Command-Tab list (related directly to point 1).
BTW, speaking of point 3., the reverse does not occur. i.e. application is closed and light still appears in the dock... BUT, the application is correctly missing from the Command-Tab list.
This problem is WIDESPREAD. It has nothing to do with the hardware you are running. It is a bug in Mountain Lion (most likely related to the sleep and/or power nap functionality). Apple has to fix it. Meantime we have to just be patient... and put up with the frustrating user experience.