Headlights are powered by fuselink L, Exterior lights/ fuse 4, courtesy lamps/fuse 8, also fuselink L, cluster illumination/ fuses 10 & 11, and radio/ fuse 11 powered by fuselink M. If M was open there would be a lot of other things not working. The only thing in common to all of these is the main light switch.
I'm confused a little bit because not only your rear park but also your front park lights should be out and you specified tail lights only.
Also, turn/stop and hazard lamps don't go through the light switch which would explain why they are working.
Here are testing procedures: