We're pushing Pre-Release (v1.12.9980) which improves the type inferring in such cases.
Although; I'm not sure how to replicate this case exactly.
Do you have a small example with Revision, RevisionFactory, and withApproval definitions?
Thank you!