WMS: bugfix: missing range-type/band/nil-value causing mapscript segfault.
Minor refactoring.
WMS: bad yield value bugfix + 2 minor edits