Add support for calculated extensions

Fixes: https://bugzilla.osafoundation.org/show_bug.cgi?id=12151