Fix set static id regression introduced by PR #239

- Static ids can be set on fields containing dynamic attributes
- Added relevant test