Finally managed to find the bug that made regex matches fail