Common problem for the 3 series is the electrical wire bundle that runs from the rear electrical lights up through the left-side trunk water drain channel to the trunk lid. The opening and closing of the trunk lid bends the wire bundle and weakens it to the point of wire insulation breakage...this can cause many electrical problems, include fire. You had better gently pull out the rubber retaining grommet on the trunk lid that surrounds the wire bundle and carefully cut open the plastic bundle wrap as much as possible above and below where the wire bundle has been bending. I bet you will find broken insulation, bare exposed wires, and maybe even broken wires. I repaired my wires and used heat-shrink wrap, then closed up the bundle wrap and used electrical tape to close up the bundle wrap. Re-install the rubber grommet, then make sure the wire bundle sits in the bundle retaining clip which is on the trunk hinge...this will keep the wire bundle off the bottom of the water drain channel, so will keep the bundle dry.....I recommend you check this wire bundle ASAP, because of the fire hazard potential.... and it will probably solve any electrical problems you may not be aware of. It's an easy fix, and cheap, too.
Good luck