Second file have one page rotated to check double-horizontal pages.
Everything work correctly? (Personal tag is still here. I dont have idea how remove it - Messing with headers dont had any effect. I'm open for suggestions.)
No doubled pages? (Not counting first - Cover.)
And most important: No empty page on end in Portrait mode? (Please check both files.)
There should be one page blank in second file. Page right before rotated page. But only in landscape mode.

Tested, first file HAS blank page at the end, second doesn't. Landscape works as expected if set from device, in the rotated page the behavior is a little bit odd (when viewing in landscape it actually displays portrait ) IMHO but it's me, I'm sure someone'd find it useful
Also, the cover doesn't seem to be displayed twice, don't know why.

Regarding the PDOC tag, there's a Quality Check plugin for calibre that apparently lets you remove/fix the tag for mobi files (without reconverting mobi to mobi). Maybe you can get inspiration there or contact the author on how it's done.

Quote:

Fix Mobi/AZW/AZW3 files for a Kindle Fire to insert an ASIN and set the correct cdetype in the internal data to enable sharing and appear in the correct folder