I suppose the group of pirates could be bothe the subject and the direct object, according to the movies they spent a lot of time burying each other for one reason or another.
My first thought on reading the original sentance was the ship was careening alongside what. Does careening mean turned over for repairs? I could LIU but I have to go home and ice cupcakes for youth group.