The general rule of thumb of "don't put ed/max or ed/min jewels in armour" still holds, but there is a bit more to this bug than those couple of lines.
The actual way it works is, if a non-weapon item has +min or +max damage on it, then added %ed will not affect the min or max (respectively) damage. If it has both +min and +max, then added %ed won't do anything at all. But, if an item has %ed and you add +min or +max to it, it will still work fine.
Unfortunately when you add an ed/max jewel, it adds the +max on first so then the %ed won't affect the max like it is supposed to.
But you also have to be careful with just %ed or +min/max jewels if the item already has other modifiers on it.
There is no bug in putting these things into weapons, just to be completely clear.