A bit of a tricky one this.
It sounds like a bug but it would depend on the exact circumstances and, I’m guessing in this instance, those circumstances may be very difficult for anyone to replicate without your original document.
My quick work-around would be to simply not delete master pages. Just rename them - double click the name in the master page editor dialog - as something like “Unused Master Page 1”. Then just ignore them.
It shouldn’t affect your resulting PDF as - if they’re not applied to any document pages - they shouldn’t be included by the export function.
(If you delete the objects on them they should only take up a few extra bytes in the SLA and, with 300 pages, I’d say you wouldn’t notice the extra burden.)
You should try and report it as a bug - if you have a login - but it may be difficult for the developers to track the problem down without specific information.