RR: improvements to deployment environment handling.