Bug found by clang 3.4