Properly handle protected trap doors placed on the upper part of a block. Fixes #767