The roof rail weatherstrip has a screw into the header that will hold it and the sealant on the weatherstrip if any will do the same. Sometimes there are locating screws visible from the top and between the retaining nuts (two on each side). Other than that it is rust. Try tapping with a rubber mallet around the pockets and also the application of penetrating oil will help, then use the mallet to drive the header forward, alternating from side to side. Use the mallet in the corners and if they are not disintegrating the header will slowly move.