fixes #217 - copy desired capabilities before modifying