Actually that is just a principle. If you are confronted with a dilemma and you examined all the possible courses of action and was able to set up a sequence for these actions starting from the best until the least satisfactory, then you should choose the best, even if it is at odds with your particular sense of morality.
An example: If you have a fellow human who suffers in terminal pain, and none of the pain treatment medications work any more, then the only way to help is a mercy killing. If your particular moral sense does not allow this solution, then you have a warped sense of morality.
This principle urges you to do the right thing, no matter what your sense of morality tells you. After all, you would not let an animal suffer needlessly, and your fellow human deserves and needs MUCH MORE compassion and love. Since you also believe in a “get out of jail card free”, so you can do the right thing and then repent and confess.