This reminds me of a problem we hit at work. Ended up going a different direction but same root issue.