Editor: fix tiles created on invisible layer. Fix #508.