Just wanted to say thanks for this. It's amazing how many little things can be found online, once I had chased down how to frame the online search anyway.
Kudos for coming back to note how you had resolved it, so that two years later someone could quickly find the answer!
Just to note for others: in my case, commenting out either all or any part of this attribute set led to build failure, but I just changed "even" to "auto" in the first "value-of-select=" shown below, and that did the trick.
<xsl:when test="name(/*) = 'bookmap'">