Don't list items in adv. inv. from squares where item can not be put on.

Fixes #9216

Just tested, it also fixes #9222.