I have made similar changes on various code revisions and haven't seen AP reboots. It must be specific to your code or config. If this is reproducable, your best bet is to open a TAC case. If it is random, you should probably still open a TAC case, but it may be more difficult to isolate the reason if they can't make it happen.
There may be debugging they (TAC) can turn on and leave on and maybe catch the root cause.