Thanks. They are checked for being locked and can't be background since in the real case it'll always be a layer in group. Invisible it might be, but has not mattered so far.
And in the example PSD (and any that I've tried) that causes an exception these are all OK.