If-else blocks "scale" and "scaleOrientation" was swapped. Now the comparing and interpretation of these key-words is correct. Added test case bugs/xde/bug23328