Static initialization crashing with bad instruction