Adapted to changes in thymeleaf/thymeleaf#181