fix removing field with reference to array items & specs

Fixes #1990