Prevent expanded layer from overflowing