Behavior of a perched crystal layer in a magma ocean