It would be much better if you could describe your problems better. Just saying "strange behavior" doesn't describes anything and linking to another page doesn't summaries the problem either.
So the problem is that the "Sub-preamble has changed" test fails if there is a tab character in the preamble, right? Why not use this as title.
The tab comes from your code and is not generated from standalone, right? Well, remove the tab!
The "sub-preamble has change test" stores the preamble from the last run and the current one in an macro each and then compares it. This sometimes doesn't work if there are special characters or catcodes used. This could only be fixed by a different compare test which would be difficult to implement. Currently I don't see having the time for that. Just keep special stuff out of your preamble for now.
Sorry for the format of the Entry. I am short in time either. Ulrike asked me to post this on bitbucket to let you know that with luatex 1.07 onwards some signs in the preamble will lead to empty pictures in the main document but the pictures will work without any problem as standalone.