A case of the tail dogging the wag.
Source: Having escaped with some difficulty from the persistent attentions of some prostitutes in the street. Another Almanac of Words at Play, (W. Epsy)
-- S J Perelman, (Feb 1 1904-1979), US humorist; Sidney Joseph was best known for Around the World in 80 Days.