Shaarei Yosher (3-25) and the yesod of the Ran that in cases where the prohibition is the benefit - the issur of Psik Reisha won't apply.