Simplify get_key method in PropertyConfig
This was added in 6a055c2d but can be done in a much concise way.