fix attribute IDs when building from reflections