util: add overwriteChainableMethod utility (for #215)