An employee of a common carrier who is killed or injured due to improperly adjusted and filled frogs, switches, and guardrails or by a locomotive, tender, car, similar vehicle, or train in use contrary to federal or state railroad safety laws and standards shall not be held to have assumed the risk of death or injury by continuing in the employment of the carrier after obtaining knowledge of the unlawful use of the locomotive, tender, car, similar vehicle, or train; nor may the employee be held to have contributed to the injury when the carrier has violated federal or state railroad safety laws and standards and the violation contributed to the death or injury of the employee.