popup: doesn't invalidate zIndex when anchor set while popup is hidden (close #1214)