2.80, a3261aad130e, 2019-01-04
2.79, f4dc9f9d68b, 2018-03-22 (is slightly less broken than 2.80)
Short description of error
No item or the wrong item is selected when the selection menu of a property is opened.
Exact steps for others to reproduce the error
Open default startup .blend.
Add "Copy Location" constraint to "Cube". (Bug is not limited to constraints.)
Set Target to "Light"
Open selection menu again for Target. "Camera" will be highlighted instead of "Light".
The attached diff passes the data behind PointerRNA *ptr as active item. This ends up in overwriting the current value of but->func_arg2. I can't tell whether this will cause problems somewhere else.