silvas added a comment.
My gut is that this seems too complicated, but on the other hand I don't have a suggestion for simplifying it. I'll let Richard decide on what is an acceptable level of complexity.
Could you put a lengthy comment somewhere describing exactly which shipping module map files are affected by this, and the range of affected SDK versions (hopefully this will be fixed in the next release?)?