fix removing field with reference to array items & specs

fixes #1988