Null pointer when CRS Envelope isn't available in w3ds community module

This is the same patch for master as Pull request #541

Because CRS.getEnvelope can return a null envelope for some definitions.

When this case occurs then the original envelope will be returned.