Patches for check_swap.pl [sf#882097] [#442]