The problem was due to a wrong number of IPO-channels getting keyed for the quaternion channels (3 instead of 4). Was a simple copy+paste error. Also added in check for using "Limit Distance" constraint when using VisualKeying.