"Warship (with boards installed on its four sides to defend against arrow attacks)" (Shiming) > "warship" > "ship" (Guangya). A specialised character derived from 檻 (OC *ɡraːmʔ, *ɡraːms, “fence, railing, board”); see there for more on the external etymology.
This character is a classic example of historical misreadings of unfamiliar characters. The l- initial in southern dialects is probably due to confusion with 濫 (MC lɑmH, “to overflow”), not due to divergent evolutions of the Old Chinese cluster initial *gr- as this character is often cited as an example of. Likewise, the readings in other Chinese are misreadings, although this is more subtle. Expected Mandarin reflex is xiàn, and jiàn is due to confusion with 鑑 (MC kˠamH, “mirror; to reflect”). Wu and Min Dong readings are results of confusion with 檻 (MC ɦˠamX, “doorsill”). Despite these irregularities, all the Sinoxenic readings are regular.