I think I have figured it out. I could be wrong, but it makes sense to me: There is a difference between the filaments, and if it is backward they will work, but it would confuse other drivers at night. The longer filament is the brighter one, and I would think it is used as a brake light/turn signal, while the shorter one is just a night light. If you hold the bulb vertically so that the long filament is on the left, the lead closest to you is the bright lead. From there, I just follow the visual path through the socket to the appropriate wires (dark-green/yellow for turn signals/brakes, and brown for standard night lights). Please tell me if you think otherwise.
Sorry for taking over this thread, but I think that it is at least useful to know in case someone else has wiring as mangled as mine was.