All liens for erecting, constructing, altering, or repairing the same building, house, structure, fixture, boat, water craft, railroad, or railroad embankment shall be concurrent, and shall be paid in proportion out of the proceeds of the property when sold; and in case the sheriff shall have doubts as to the proper application of the money, he may return the same to the court, stating the question, for its determination.