Couldn’t you get around this by just making it a trade secret and not publishing it? Your competitor can’t ask to see your source code (assuming it’s compiled). Patent trolls deserve whatever they have coming. It’s one thing if they have a novel idea but if they knowingly sit on a patent of a fundamental method that was given to them in error, they don’t deserve any consideration.