Flavour tagging is technically challenging on the experimental side. However, it suffers from a more fundamental problem from the theoretical point of view, in particular when implemented in fixed-order perturbation theory. It turns out that an infrared-safe definition of a flavoured jet is intricate due to the singularities induced by the emission of flavoured quark-anti-quark pairs of negligible energy. Although this issue has been addressed by a modification of the standard kT jet algorithm, the situation is not entirely satisfactory as most measurements rather use the anti-kT jet algorithm. In this work, we propose a flavour-aware infrared-safe modification of the anti-kT jet algorithm that is easy to implement within perturbative Monte Carlo frameworks and has minor impact on jet phenomenology when flavour tagging is not required. Besides the numerical verification of the infrared safety of the proposed algorithm at next-to-next-to-leading order, we also present results for the hadro-production of a lepton pair in association with a b-jet, and of a top-quark pair decaying into b-jets and leptons.