Intrinsic and secondary mechanisms for biquadratic exchange coupling in magnetic trilayers