- avoid potential duplicates in instance attributes (many thanks to thomas renner for the patch)
- use same logic for connection context settings when using form variables or when setting up context in workflow actions